PHILADELPHIA -- The game appeared over. The New York Knicks, leading the Philadelphia 76ers 91-74 with 5:15 left on Friday night, had inserted their reserves.
Two streaks -- the Knicks' winning spree and the Sixers' history-threatening skid -- seemed on the verge of continuing.
But the Sixers surged and the Knicks sagged. The game remained in doubt until a potential tying 3-point attempt by Philadelphia guard Michael Carter-Williams spun out in the closing seconds. Teammate Thaddeus Young rebounded it and scored, but New York emerged with a 93-92 victory.
"A win, at the end of the day, is a win," Knicks center Tyson Chandler said.
It was the eighth straight victory for the Knicks (29-40) and the loss was the 23rd in a row for Philadelphia (15-54).
Forward Amar'e Stoudemire had 22 points and 10 rebounds and Carmelo Anthony scored 21 for New York (29-40), which left the Sixers three shy of the NBA record for consecutive losses, held by the 2010-11 Cleveland Cavaliers.
The Sixers also dropped their 18th straight home game, one off the league mark held by the 1993-94 Dallas Mavericks.
Carter-Williams had 22 points, 13 rebounds and nine assists for the Sixers, who shot 37.4 percent from the floor and made just 10 of a season-high 41 3-point attempts.
Young finished with 21 points and center Henry Sims had 16 points and 13 rebounds for Philadelphia.
Guard Tony Wroten, who scored 12 points, was helped off the court after spraining his right ankle with 6:01 left in the game. X-rays were negative, but he is not expected to play Saturday, when the Sixers visit Chicago.
Chandler added 17 points and 10 rebounds for the Knicks, who took the 91-74 lead on a breakaway dunk by guard Tim Hardaway Jr. Coach Mike Woodson then removed his starters gradually, with the last of them leaving the court with 4:04 left and the New York lead 91-76.
The Sixers mounted their run, cutting the gap to 92-90 on Young's 3-pointer with 32.9 seconds left.
At that point, Knicks coach Mike Woodson reinserted his starters.
"I had no choice," he said. "They scared the hell out of me."
Chandler said, "I figured I might have to go out there. I was hoping I didn't, but I figured I might have to come out."
Hardaway missed a 3-point attempt with 13.6 seconds left, but the Knicks regained possession after Philadelphia's James Anderson threw the ball away with 8.6 seconds remaining.
It was a broken play, Sixers coach Brett Brown said, on which Young was open behind the arc in the left corner. It was also "a big play at a big time that didn't go our way," according to Brown.
Anthony made one of two free throws with 7.3 seconds to play, but Carter-Williams came up empty from the arc.
"I've got to be careful next time, coming down the home stretch," Woodson said. "I've just got to get our young buck to understand time, score and situations."
The two teams muddled through a hideous first half, one that saw the Knicks shoot 32.6 percent from the field and miss 15 of 16 3-pointers but nonetheless build a 41-36 halftime lead. Philadelphia shot 28.6 percent from the floor and went 4 of 22 from the arc.
The Sixers made just 5 of 25 from the field while being outscored 20-12 in the second quarter, with the point total equaling their lowest in any quarter this season.
New York snapped a 34-34 tie by scoring seven of the last nine points in the half. Four of those came from Anthony. He had 13 points by then but was just 4 of 14 from the field. Stoudemire added 10 points for the Knicks in the opening half.
Carter-Williams had 11 points for Philadelphia and Sims contributed 10 points and nine rebounds in the first 24 minutes.
New York extended its lead to nine, at 55-46, midway through the third quarter. Guard J.R. Smith, 0 of 7 from the floor in the first half, made two 3-pointers and Stoudemire scored.
The Knicks fought off the Sixers the rest of the quarter, settling for a 72-65 lead heading into the fourth quarter.
NOTES: Sixers G Tony Wroten began the night averaging as many assists as turnovers (2.8) and coach Brett Brown was asked about Wroten's tendency to force the action. "We talk to him, we show him, we try to teach him," Brown said. "He has shown subtle signs of improvement, but the magic or coaching trick to have him not do that, I don't know (what that might be). I think it's just part of us closing our eyes and projecting him out a few years and wondering if it's in him to make that change. I think it is, because then you've got something." ... Duke F Jabari Parker is expected to be one of the Sixers' targets, should he come out in this summer's draft, but Parker told ESPN after Friday's loss to Mercer in the second round of the NCAA Tournament that he considers his career "incomplete." Asked for his reaction to Parker's comments, Brown said, "Only because of the rules am I not able to give my honest comments."