Once Wade's hot streak ended, so did the Heat's dominance of the New York Knicks.

Danilo Gallinari and Landry Fields made consecutive 3-pointers in the final 1:18, and the Knicks rallied to beat the Heat 93-88 on Thursday night.

"It's important for us mentally," Gallinari said. "We lost two times against them and we wanted to get this win. Now we know we can beat them. It was an important win."

Amare Stoudemire scored 24 points for the Knicks, when he was often the only one in a white jersey to make a shot for three quarters. But Gallinari was huge in the fourth, when New York finally contained Wade after he was 14-of-15 through 36 minutes.

Gallinari finished with 20 points and Fields added 19 points and 13 rebounds to help the Knicks win their second straight after a six-game skid.

Wade, fighting migraines that forced him to wear goggles, had 34 points and 16 rebounds, but missed all seven shots in the fourth quarter. James was 7-of-24 for his 24 points.

"When I came back in, I trusted my teammates. I got off the ball, gave guys shots. They just didn't go down," Wade said. "Kind of got out of a rhythm there for a while -- doing what I was supposed to do. I was playing kind of point guard at the time so I was facilitating, got some good shots; just didn't go in. Before that I was really aggressive. I was playing a different role."

The Heat, playing without Chris Bosh because of a sprained left ankle, lost for the fifth time in six games. They managed only 15 points in the fourth quarter as their seven-game winning streak against the Knicks was snapped.

James tried to pull it out for the Heat, scoring four straight points to put them up 84-83 with 1:32 to go. Gallinari answered with his 3-pointer 14 seconds later, and Fields knocked down another with 49 seconds left, making it 89-84.

James had consecutive driving layups to cut it to one with 17.5 seconds left, but Raymond Felton sank a pair of free throws for a 91-88 advantage. Mario Chalmers missed a tying 3-pointer, Felton hit another pair from the line, and the Knicks had their biggest victory of their season.

"I think we played great defensively from the start," Stoudemire said.

James came in as the active scoring leader at Madison Square Garden at 30.5 points per game. But forced to play as the power forward with Bosh out, James looked uncomfortable until the closing minutes, when it was too late.

It was another chance for the Knicks to validate what's been their best season in a decade by beating an NBA power, coming in the first time TNT televised a game at Madison Square Garden in five years and in front of a celebrity-filled crowd that included Howard Stern, Kanye West, Alicia Keys, Donald Trump, Magic Johnson, Carrie Underwood and Tracy Morgan.

The more electric the Garden, the better James usually is. The Knicks had lost 10 straight against James' teams since beating him and the Cavaliers on Dec. 19, 2007.

Knicks coach Mike D'Antoni said before the game that sometimes "you just have to weather the storm" when the league's MVP rolls into New York, but he was off right from the start in this one.

James' preference has always been to play facing the basket, and his struggles from close range were similar to a golfer who can drive it a mile but misses on the greens. James missed 14 of 18 shots through three quarters, ruining Miami's chance to build a big lead while New York was struggling to get anything besides Stoudemire.

"I had some great looks, I just missed them," James said. "Had nothing to do with me being down in the low post."

It wouldn't have mattered if Wade stayed as hot as he was through three quarters.

Wade's original choice in goggles to wear to deal with the light was rejected by the NBA, which ruled that they were too dark and gave him an unfair advantage. The Heat were told after the morning shootaround so Wade was forced to switch to one with less tinting, similar to the ones he had been wearing at practice after missing a game with the migraines.

They seemed to work, and he appeared troubled by them only once, when he stopped his dribble to adjust them during a third-quarter possession, wasting time that led to a shot clock violation.

He quickly rebounded with eight straight Miami points, his dunk giving the Heat a 66-59 lead that was their largest of the game at that point. They extended it to 73-64 on James Jones' 3-pointer with 16 seconds remaining.

Yet the Knicks, who other than Stoudemire were a combined 14-of-50 through three quarters, opened the fourth with eight straight points to cut it to 73-72 on Toney Douglas' free throws with 9:41 to play.

Both teams stalled over the next few minutes before Gallinari scored five straight points, with his 3-pointer giving the Knicks a 77-76 lead with 5:20 remaining.

Game notes
James, Wade and Stoudemire all were announced as starters for the All-Star Game. James and Wade are the first teammates to start for the Eastern Conference since Wade and Shaquille O'Neal represented the Heat in 2007, and Stoudemire is the first Knicks player elected to start since Patrick Ewing in 1997 -- though he was injured and missed the game. ... The Heat were seeking their longest winning streak against the Knicks. They also won seven straight times from Jan 5, 2005, through March 19, 2006.