NBA

The next chapter of Linsanity will be written in Brooklyn

CLEVELAND, OH - APRIL 3: Jeremy Lin #7 of the Charlotte Hornets handles the ball during the game against the Cleveland Cavaliers on April 3, 2016 at Quicken Loans Arena in Cleveland, Ohio. NOTE TO USER: User expressly acknowledges and agrees that, by downloading and or using this Photograph, user is consenting to the terms and conditions of the Getty Images License Agreement. Mandatory Copyright Notice: Copyright 2016 NBAE (Photo by David Liam Kyle/NBAE via Getty Images)

CLEVELAND, OH - APRIL 3: Jeremy Lin #7 of the Charlotte Hornets handles the ball during the game against the Cleveland Cavaliers on April 3, 2016 at Quicken Loans Arena in Cleveland, Ohio. NOTE TO USER: User expressly acknowledges and agrees that, by downloading and or using this Photograph, user is consenting to the terms and conditions of the Getty Images License Agreement. Mandatory Copyright Notice: Copyright 2016 NBAE (Photo by David Liam Kyle/NBAE via Getty Images)

Jeremy Lin agreed to a free-agent deal with the Brooklyn Nets on Friday.

The journey continues...thankful for the next chapter!! #Godisgood pic.twitter.com/1PLutlFbyO

— Jeremy Lin (@JLin7) July 1, 2016

According to reports, he will get $36 million over three years.

More from FoxSports

Sources: Lin's three-year, $36M deal with Nets includes a player option on third year, trade kicker and bonuses.

— Adrian Wojnarowski (@WojVerticalNBA) July 1, 2016

Hearing Jeremy Lin landed a three-year deal worth $36 million from Brooklyn

— Marc Stein (@ESPNSteinLine) July 1, 2016

Lin, 27, revived his career as a backup to point guard Kemba Walker for the Charlotte Hornets this past season. In 78 games, he averaged 11.7 points, 3.0 assists and 3.2 rebounds. He opted out of his deal after the season.

The Nets will be his sixth franchise as he enters his seventh season in the league. He gained national attention when he rose from obscurity to stardom with the New York Knicks in the 2011-12 season, averaging 14.6 points and 6.2 assists per game.

In his six seasons in the NBA, Lin has averaged 11.7 points, 4.4 assists and 2.8 rebounds per game.