A half-dozen teammates surrounded Jeremy Lin as the game ended, hugging him and slapping him on the back.

The New York Knicks needed a win any way they could get it.

Lin, the second-year guard out of Harvard, scored a career-high 25 points to lead the Knicks to a 99-92 victory over the New Jersey Nets on Saturday.

Driving, slashing and pumping his fists, Lin scored 19 of his points in the second half, including 12 in the fourth quarter, while sparking the Knicks to only their third win in 14 games.

Prior to Saturday, Lin had just 108 career points in 38 games for the Warriors and Knicks.

"It's one game, so don't get too excited," said Knicks coach Mike D'Antoni. "But it was something we needed."

Amare Stoudemire and Tyson Chandler scored 17 points apiece but Carmelo Anthony had just 11 on 3-of-15 shooting. Still, the Knicks snapped a two-game losing streak and salvaged the end of a back-to-back-to-back stretch after losing to the Bulls on Thursday and Boston on Friday.

Deron Williams had 21 points and 11 assists to lead the Nets, who have lost four of five. Kris Humphries added 20 points and 12 rebounds and Jordan Farmar scored 19 off the bench.

D'Antoni said he was impressed with Lin's defense in addition to the obvious spark he provided on offense. Lin added seven assists, five rebounds and two steals in his nearly 36 minutes off the bench.

"He darted well and everyone saw what he did with his passing," said D'Antoni. "He played really well."

The Knicks trailed by as many as 12 points in the first quarter and were down 30-20 going into the second. Lin was scoreless in 3 1/2 minutes in the frame. He had six points in the second quarter and the Knicks outscored the Nets, 26-18, to pull within two at halftime.

They were still down two, 72-70, going into the fourth but a 9-2 run midway through gave them the lead for good. Stoudemire and Lin led the way during the burst and New York pushed its lead as high as 11 down the stretch.

Nets coach Avery Johnson likened the game to a boxing match, an appropriate metaphor for a Saturday night.

"They swung last," he said, "and kind of knocked us out."

Game Notes

The Knicks are 12-5 in the last 17 meetings between the teams and have won five in a row, including all four last year...The Nets have lost five of their last six at New York.