Updated

Jeremy Lin scored a career-high 25 points and the New York Knicks salvaged the finale of a back-to-back-to-back set by beating the New Jersey Nets 99-92 on Saturday night.

Lin came off the bench to control a struggling offense, adding seven assists while outplaying Nets All-Star point guard Deron Williams.

Amare Stoudemire and Tyson Chandler each added 17 points for the Knicks, who won for just the third time in 14 games. They fell just short in losses to Chicago and Boston over the last two nights before picking up a much-needed victory Saturday.

Williams had 21 points and 11 assists for the Nets, while Kris Humphries added 20 points and 12 rebounds.

Lin, who played at Harvard, was the catalyst for the Knicks, who have been desperate for production at point guard while they wait for Baron Davis to finally become available. Lin was a hit with the fans practically from the moment he checked in, and some of the loudest cheers of this disappointing season roared through Madison Square Garden when his three-point play made it 95-86 with 2:03 remaining.

He scored on the next possession to make it an 11-point game, and teammates hugged him at center court after the buzzer as Pearl Jam's "Jeremy" blasted through the arena.

Carmelo Anthony had just 11 points on 3 of 15 shooting, perhaps tired on the third straight night of games.

The losing has created speculation that Mike D'Antoni's job could be in jeopardy, especially if the Knicks had dropped this one and fallen behind the Nets in the Atlantic Division standings. But he said before the game there was no reason to panic and that he still believed in his players.

He had noted how much they struggled to score beyond Anthony and Stoudemire, needing someone else to step up. He found that someone in Lin, the first American-born NBA player of Chinese or Taiwanese descent.

The second-year pro has hardly been a factor and even was sent to the NBA Development League recently, where he had a triple-double. But D'Antoni gave him a chance last Saturday while searching for a spark at the end of a road trip, but it's hard to imagine he saw this coming.

Lin drove along the baseline and fed Stoudemire for the tiebreaking basket, then scored on his own drive for an 86-82 lead with 4:59 left. Stoudemire scored again, and after a jumper by Williams, Chandler converted a three-point play for a 91-84 lead and Lin put it away from there as "Jeremy! Jeremy!" chants broke out.

Anthony Morrow had only 11 points on 4 of 12 shooting for the Nets, one night after scoring a career-best 42 points and making an NBA season-high eight 3-pointers.

The Nets raced to a 17-7 lead and were ahead 30-20 after one quarter behind 10 points from Williams. But with Lin playing the entire second quarter in rare first-half playing time, the Knicks seemed to get a spark on both ends of the floor.

Lin had team highs of six points and three assists in the second quarter, including a lob to Chandler that allowed the Knicks to tie it at 46 with 1:32 remaining. New Jersey took a two-point lead into the half after a basket by Jordan Williams.

Notes: Humphries was booed loudly on a few occasions, as he was when the Nets played here in the preseason and in a number of other arenas after his brief marriage to reality star Kim Kardashian. ... Nets starters Shawne Williams and Shelden Williams both finished last season with the Knicks. ... The teams play only three times this season, once more at Madison Square Garden and once in Newark.