NEW YORK — Brooklyn coach Kenny Atkinson asked before facing the Knicks if anyone knew how to stop Kristaps Porzingis.

The Nets never really did, and they couldn't beat New York even after the star forward was injured.

Courtney Lee scored 18 of his 27 points in the second half, Michael Beasley added 15, and the Knicks held on to beat the Nets 111-104 on Thursday night after Porzingis left the game due to a sore left knee early in the second half.

Replays showed Porzingis motioning to the bench with 9:25 remaining in the third after contesting a shot made by Brooklyn's Rondae Hollis-Jefferson. The Knicks' leading scorer had 13 points in nearly 18 minutes in the first half.

"It was one play when I actually made the pass out to the corner to Courtney and hit the 3. I felt my knee just kind of buckle maybe a little bit and I felt a little pain there," the 22-year-old from Latvia said. "It's more of just being cautious. I had a little sharp pain there. I honestly don't have any more information about what is going on there, but it shouldn't be, hopefully, not too serious."

Porzingis added that he is unsure whether he would play Saturday night against Oklahoma City in Carmelo Anthony's first game back at Madison Square Garden after he was traded in September.

Enes Kanter had 13 points and nine rebounds for the Knicks, who earned just their second road victory of the season. Their only other one was Oct. 29 at Cleveland.

The second of four meetings this season had a lively atmosphere, especially late in the second half when Brooklyn made its push with Porzingis out for good.

"When KP went out, Mike really stepped up there for that stretch and got us buckets," Knicks coach Jeff Hornacek said. "Late in the game we said, 'That's their run.' It was a battle. To me, as a coach, it was a great game to watch. Guys were flying around and hitting each other."

Spencer Dinwiddie had a career-high 26 points for the Nets, who have dropped the first two games to their city rivals. Hollis-Jefferson added a career-best 25 points on 10-for-16 shooting and Caris LeVert scored 15.

"We just couldn't make the plays down the stretch we needed to make," said Allen Crabbe, who shot just 1 for 8, including 1 for 7 from 3-point territory.

The Nets made only 12 for 42 beyond the 3-point line.

New York appeared on its way to an easy one after shooting 23 for 43 from the field and 6 for 13 from the 3-point line and leading by as many as 18 points in the first half. The Nets rallied to take an 82-79 lead on DeMarre Carroll's 3-pointer with 1:49 left in the third.

But the Knicks went on an 8-0 run to close the quarter, capped by Lee's 3-point shot that increased their lead to 87-82 with 25 seconds left.

Brooklyn trailed 100-97 with 3:29 to go before a 3-pointer by rookie Frank Ntilikina and an impressive defensive Knicks effort, contesting five straight shots, including a block by Ron Baker under the rim that forced a jump ball. Lance Thomas then sealed it with a 3 that made it 106-97 with 1:07 left.

"We were scrappy, man. We fought," Thomas said. "Ron came in and gave us a really big boost and we were just tenacious tonight. We didn't want them to outdo us."

TIP-INS

Knicks: Center Kyle O'Quinn had nine points and 10 rebounds. . The teams meet again at Barclays Center in January and play another at MSG to cap the month.

Nets: Dinwiddie has six 20-point games this season, tied with D'Angelo Russell for the team lead. . Dinwiddie also had seven assists, extending an NBA season-best 14-game streak with six or more assists.

NO RUSH

New York guard Tim Hardaway Jr., out with a stress injury in his lower left leg that's caused him to miss the last 12 games, is unsure when he will return to the team and thinks it would be smart not to "rush" back.

"The goal is to just get better first. I'm not giving myself no deadline", Hardaway said before the game. "I'm not going to rush it. I'm going to wait until I'm 100 per cent mentally ready to go. If it was the playoffs, I'd be out there right now. But you got to be smart and do what's best for you. I trust the team."

Hardaway is averaging 17.8 points. He expects to be re-evaluated next Tuesday.

UP NEXT

Knicks: Host Oklahoma City on Saturday night.

Nets: Visit the Toronto Raptors on Friday.

___

For more NBA coverage: https://apnews.com/tag/NBAbasketball