NEW YORK _ The Knicks weren't far from Madison Square Garden and they were in their own city, but coach Jeff Hornacek still considered this a true road game.
The blue and orange scattered throughout the Barclays Center stands didn't matter and neither did the loud cheers that erupted following every big Knicks basket.
"It's not the gym they're used to so I would say it's a road game," Hornacek said before the game.
Entering the night an NBA-worst 1-8 away on the road, the Knicks needed a win away from MSG.
They got one on Thursday night, though it wasn't easy.
The Knicks lost a double-digit lead in the second half and had to hold off a late Nets charge for a 111-104 victory.
Courtney Lee led the Knicks with 27 points and went 3 of 4 from 3-point range, while Michael Beasley chipped in 15.
Lee drained a 3 to put the Knicks up, 100-92, with 4:21 remaining.
After the Nets cut it to three, triples from Frank Ntilikina and Lance Thomas made it a nine-point game with 1:06 remaining, ultimately sealing the victory.
But the win also brought another concern.
The Knicks, who already are without Tim Hardaway Jr. because of stress injury in his left leg, lost Kristaps Porzingis early in the third quarter when he had to leave the game with a sore left knee.
Porzingis had 13 points when he departed. Without him on the floor, the Nets made it a close game after the Knicks looked headed for a comfortable win early on.
They led by 18 points in the first half and had control of the game, but they couldn't keep it.
That's been a reoccurring theme for the Knicks throughout their struggles on the road, something Hornacek addressed with his players.
"We just talked about it as a team saying when you go on the road, the home team always plays better which means you've got to be better with what you're doing. It's not playing 34 minutes or 35 minutes of the 48," Hornacek said before the game. "You've got to play all 48."
The Knicks opened the second half leading by 13 until the Nets chipped away.
A three-point play from Tyler Zeller three minutes into the third sliced the Knicks' lead to five points before back-to-back 3s by Allen Crabbe and Spencer Dinwiddie made it a three-point game later in the period.
Then the Knicks lost the lead completely.
After a Rondae Hollis-Jefferson layup and a DeMarre Caroll 3, the Nets were up 75-73 with 5:18 to go in the third.
But a three-point play from Michael Beasley and a 3 from Lee put the Knicks back up 87-82 at the end of the third.
The Nets hung around, though, always staying within striking distance after a rough first half.
The Knicks opened up an 11-point lead on a pair of Kyle O'Quinn free throws just less than three minutes into the second quarter before Doug McDermott pushed it to 13 with a second-chance basket. A bucket from Enes Kanter pushed it 18 points with 2:54 left in the second quarter.
By halftime, the Knicks held a 63-50 lead and were shooting 53.5 percent.
Porzingis had 13 points in the opening quarters while Kanter had 11 and Lee had nine.
Meanwhile Hardaway, their second-leading scorer, continues to deal with the stress injury in his lower left leg.
Speaking to reporters before the game for the first time since being shut down on Dec. 5, Hardaway said the injury has improved and the plan is still for him to soon be re-evaluated. But he isn't going to rush back to the court before he's healthy and mentally prepared to do so.
"It's getting better," Hardaway said. "Just continuing to take it day by day, little by little. It's a stress injury so you can't really rush anything. You've got to let it heal on its own."