MIAMI -- Ray Allen was somewhat surprised to see how open he was. So was Dwyane Wade, who even took an extra dribble before believing his eyes and sending a 50-foot pass to the best 3-point shooter in NBA history.
Moments later, the Miami Heat were back on track.
Allen scored 14 of his 25 points in the fourth quarter on a milestone day for the veteran, Wade and LeBron James each added 24 points and the Heat closed with a flourish to beat the Houston Rockets 113-104 on Sunday and snap their worst stretch of results since 2011.
"When Ray gets into a rhythm, he's the best 3-point shooter of all-time," said Heat forward Chris Bosh, who scored 18 points to help Miami win for just the second time in its last seven games.
Miami trailed 97-92 following a 3-pointer by James Harden midway through the fourth, then finished the game on a 21-7 run.
Allen had 11 points during that late stretch, including a 3-pointer that allowed him to pass Allen Iverson for 21st on the NBA's scoring list. It was also the 750th regular-season win that Allen was a part of in his career.
"I don't know how I get open," said Allen, who took about 1,000 shots on a practice day Saturday by Heat coach Erik Spoelstra's estimate. "When I am, I have to be ready to shoot it."
Harden finished with 30 points for Houston, which got 21 points and 14 rebounds from Dwight Howard. Patrick Beverley added 15 points and Terrence Jones scored 12 for the Rockets, who've dropped three straight.
"We just didn't play well down the stretch," Rockets coach Kevin McHale said.
And that all started when no one seemed to want to guard Allen. Houston led by five when Wade sparked the late run with a 50-foot assist after a timeout that set up a 3-pointer from the left corner by Allen.
"A critical possession," Wade said.
Allen also made three technical-foul free throws to help his late rhythm. One came after a defensive three-second violation, another following Houston's second delay-of-game whistle on the afternoon, and the third when Beverley was hit with a technical in the final minute.
James hit a pair of free throws with 46 seconds left for his first points of the final quarter, and that sealed it for Miami, which moved back within three games of Indiana for the No. 1 spot in the Eastern Conference.
Allen now has 24,370 points, two more than Iverson. Afterward, he was all about the win.
"Tonight we came out and finished the game," Allen said, "as opposed to letting it slip away from us."
The first surprise of the day came about 20 minutes before tip-off, when the Heat announced Greg Oden -- who appeared in his 100th career game, nearly seven years after being the No. 1 overall pick in the 2007 draft -- would be starting at centre. It was the second start of the season for Oden, who also opened a game against Chicago last month in part because James was unavailable while dealing with a broken nose.
Oden had three rebounds in the game's first three minutes, and the Heat never trailed in the first half, going into the break with a 57-54 lead. Harden and Howard combined for 15 in the third, and Houston led 81-79 entering the final 12 minutes.
"It was a couple of mental mistakes for us down the stretch and they had a couple of calls go their way," Harden said. "It's tough.
Clearly, it was a win Miami needed. Wade's fiancee, Gabrielle Union, was on her feet to yell and cheer midway through the fourth, and James' wife, Savannah, was nearby doing the same thing, almost as if it was a playoff game.
Like all other Heat fans, they finally left a game happy.
"They see the way we've been acting at home in between games," James said of his wife and Wade's fiancee. "We came in with a mindset that we wanted to get this win. It was good to see us have to gut one out."
NOTES: Allen appeared in his 1,287th game, breaking a tie with Sam Perkins for 15th on the career list. He could pass Mark Jackson (1,296) and Elvin Hayes (1,303) later this season. ... Houston's Chandler Parsons became the 15th player to log at least 5,000 minutes over the last two seasons. ... Jeremy Lin has been on teams that have played at Miami eight times; they're 0-8 in those games, though he's appeared in only three of those contests.