MIAMI (AP) -- Dwyane Wade got hot down the stretch, and LeBron James missed a layup in the final minute.
Both were huge breaks for the Miami Heat.
James scored 28 points, Wade scored 11 of his 24 in the final five minutes -- when Miami needed him most -- and the Heat extended the NBA's longest current winning streak to 11 games, beating the Cleveland Cavaliers 109-105 in a back-and-forth matchup Sunday night.
The Heat blew a 22-point second-half lead then rallied from eight down with 5:16 left.
"We're a veteran ballclub and we've been in every situation that an NBA game can offer us," James said. "We don't get too high, we don't get too low, we just play the 48 minutes out and see where it takes us."
Dion Waiters scored 26 points, C.J. Miles added 19 and Kyrie Irving scored 17 for Cleveland, which outscored Miami by a stunning 30 points over a 17-minute stretch of the second half, yet still came up empty.
The Cavaliers are now 1-8 against the Heat since James signed with Miami in July 2010.
"We had a very good chance against a very good basketball team, the world champions, and we lost the game because of mental mistakes," Cavaliers coach Byron Scott said. "That's just something that we can't have happen again."
In fairness, it wasn't just mental mistakes that doomed Cleveland late. There was a bit of luck involved for the Heat.
Miami was up by two and held possession with 1:03 remaining. The shot clock was running down and Chris Bosh was open to try a 16-footer from the right wing. As Bosh was about to release, James got inexplicably free under the basket, thrusting both his arms skyward. Bosh threw him the pass -- and James, enjoying the best shooting season of his career, did the unthinkable: He missed the easy one.
This is where the luck comes into play.
The rebound found its way back to Bosh, the Heat ran down another shot clock, and Wade got loose for a two-handed dunk that pushed Miami's lead to 105-101 with 24.4 seconds left.
It was a double-whammy for Cleveland. Miami scored and took nearly 40 seconds off a dwindling clock in the process.
"Hey, I'm a smart player. That's what basketball IQ is all about," James said afterward, unable to hold back a sly grin. "I have no idea how I blew that layup. But it did work out for us. Got an extra possession, D-Wade was able to turn the corner and get a slam."
Said Heat coach Erik Spoelstra: "I liked that play."
Wade started what turned into a 16-4 run with a fadeaway with just under 5 minutes to go, then added a three-point play on the next Miami possession to cut the Cavs' lead to 97-94.
And after Irving missed a layup with 1:35 left, Wade got the rebound and set up Battier for a 3-pointer that put Miami on top again -- and for good.
Spurs 97, Suns 87
PHOENIX -- Patty Mills and Kawhi Leonard scored 16 points apiece to lead six San Antonio players in double figures, and the Spurs ended their nine-game road trip with a win over Phoenix.
Knicks 99, 76ers 93
NEW YORK -- Carmelo Anthony scored 29 points, Amare Stoudemire had a season-high 22 and New York snapped its longest losing streak of the season at four with a win over Philadelphia.
Thunder 102, Bulls 72
OKLAHOMA CITY -- Russell Westbrook scored 23 points, Kevin Durant had 19 points and 16 rebounds, and Oklahoma City held Chicago to the worst shooting performance in the NBA this season.
Lakers 103, Mavericks 99
DALLAS -- Kobe Bryant had 38 points to win a scoring duel with Dirk Nowitzki, and Los Angeles beat Dallas in a matchup of teams fighting to get in the playoff race.
Grizzlies 76, Nets 72
NEW YORK -- Zach Randolph had 16 points and 14 rebounds, Marc Gasol scored 14 points and Memphis won its seventh straight game with a victory over Brooklyn.
Trail Blazers 92, Celtics 86
PORTLAND, Ore. -- Wesley Matthews had 24 points, including a clutch 3-pointer with less than a minute to go, and Portland snapped a seven-game losing streak with a win over Boston.
Warriors 100, Timberwolves 99
MINNEAPOLIS -- Jarrett Jack had 23 points and eight assists, and David Lee had 22 points and 13 rebounds to rally Golden State to a victory over Minnesota.
Hornets 110, Kings 95
NEW ORLEANS -- Anthony Davis had 20 points and eight rebounds, and Eric Gordon added 17 points and eight assists to lead New Orleans to a victory over Sacramento.