NEW YORK (AP) Jeremy Lin is heading back to New York.

Lin tweeted Friday that he was signing with the Brooklyn Nets. Terms were not immediately disclosed, and Lin cannot sign with Brooklyn until at least July 7 because of the NBA's offseason moratorium.

Lin's breakout in the NBA came in New York - with the Knicks - during the 2011-12 season. The craze was dubbed ''Linsanity,'' when the then-little-known second-year guard from Harvard scored at least 20 points nine times in a 10-game span and blossomed into one of the league's biggest stories at that time.

More from FoxSports

Lin started with Golden State, then played for the Knicks and has spent the past four seasons with Houston, the Los Angeles Lakers and most recently Charlotte. He averaged 11.7 points per game last season.