Updated

The huge lead was gone, and the New York Knicks were in danger of a loss that would have hurt far more than their two straight blowouts.

"From a mental standpoint, if this game would have got away from us, ain't no telling what would have happened," Carmelo Anthony said.

It didn't, thanks to Amare Stoudemire's biggest moment of the season.

Anthony had 30 points and 10 rebounds, Stoudemire made the tiebreaking jumper with 2:35 left, and New York pulled out an 83-78 victory over the Chicago Bulls on Wednesday night after blowing a 23-point lead.

Stoudemire finished with 14 points and nine rebounds for the Knicks, who ended a two-game losing streak but made it harder on themselves than necessary with some sloppy second-half offense.

Stoudemire was a catalyst in a 19-0 second-quarter spurt while playing on both nights of back-to-back games for the first time this season. He was playing restricted minutes and was forced to sit out some games earlier this season following summer knee surgery, but has progressed past that and was on the court for nearly 30 minutes.

He had scored 17 and 15 points in the previous two games, but this time his improved play resulted in a victory.

"It's great in order to be out there playing in a desperation game down the stretch," Stoudemire said. "It feels good to be back on the court, I'd tell you that much. A lot of hard work has been put in to be in top shape."

Mike Dunleavy Jr. scored 20 points for the Bulls, who have lost three straight and five of six. They are having a dreadful time scoring, topping out at 75 points in their previous two games and barely surpassing that in this one.

Joakim Noah had 12 points and 11 rebounds in his return after missing a game with a bruised right thigh, but Luol Deng missed his third straight game with a sore left Achilles for a team already without Derrick Rose and Jimmy Butler.

"We got them. We tied them. We just couldn't get over the top," Dunleavy said. "We couldn't break through."

The Knicks were without Raymond Felton, who was resting a sore left hamstring and could be out for what coach Mike Woodson said would "probably be a little while." Fellow starting guard Iman Shumpert joined him among the injured in the third quarter after bruising his left knee during a collision.

The Knicks led by 12 points at halftime and were cruising in the third quarter before committing five turnovers in less than 2 minutes late in the period, allowing Chicago to pull within 68-54 heading to the fourth.

The Bulls then held the Knicks to three field goals in the first 9-plus minutes of the fourth quarter, outscoring them 20-6 to tie it at 74 on Noah's follow shot with 3:39 remaining. Stoudemire broke the tie with his jumper, and Anthony made it 78-74 with two free throws with 1:29 to go before Chicago turned it over to end the comeback hopes.

"We just couldn't get good shots," guard Kirk Hinrich said. "We had some turnovers, some bobbles. I feel responsible for a lot of those times."

The Knicks have been far worse than expected, creating a strange situation before this game where both coaches were asked about the Knicks coaching job.

There's frequent speculation that Woodson's job is in jeopardy, and he acknowledged that the Knicks aren't playing as well as last season, though added he thinks they can once they get healthy.

Meanwhile, an ESPN.com story suggested that the Knicks would try to get Bulls coach Tom Thibodeau, who was an assistant here under Jeff Van Gundy.

"I don't pay any attention to any of that stuff," Thibodeau said. "To me, the only thing I have to do is concentrate on our team, our next opponent, our improvement, and never get away from that. You know, there's a lot of stuff that gets thrown out there ... so if you pay any attention, it does no good."

Thibodeau went on to say how much he liked his team, though there wasn't much to like when Chicago missed its first 11 shots of the second quarter, turning a 17-15 lead into a 34-17 deficit before Dunleavy ended the drought with a 3-pointer with 5:43 remaining in the period.

NOTES: The Bulls had won the last six meetings. They beat the Knicks 11 straight times in the regular season from 1990-92, the longest winning streak in a series that dates to 1966.