MIAMI (AP) -- LeBron James and the Miami Heat benefited from their three-day break, beginning a five-game homestand with a hard-fought win over a pesky opponent.
James scored 25 points against his former team, leading the energized Heat to a 114-107 victory over the Cleveland Cavaliers on Saturday night.
Dwyane Wade added 24 points and Chris Bosh had 22 for the Heat, idle since a 90-84 loss Tuesday at Indiana. They squandered a 19-point third-quarter lead in this one and rallied from a two-point deficit with eight unanswered points late in the fourth quarter.
''We were flying around throughout the whole game,'' James said. ''Even though they made their run and slowed us down in the third quarter, you could tell how we were able to finish the game in the fourth quarter.''
Ray Allen's two free throws with 2:16 remaining capped the run and put the Heat ahead 106-100. Mario Chalmers' corner 3-pointer with 1:36 left increased the lead to 109-101.
''We're a team that has the ability to take it up a notch,'' Wade said. ''It helps because we were at home. It was between winning and losing, and we wanted to win.''
Bosh had a season-high 12 rebounds and James was one rebound and assist short of a triple-double.
''I wanted to be more consistent with my rebounding and be in the right spot at the right time,'' Bosh said.
Kyrie Irving scored 19 points, and Tristan Thompson and Dion Waiters each had 16 for the Cavaliers, who played the second half without coach Mike Brown. He was ejected late in the second quarter after he stormed onto the court looking for a foul on Shane Battier's block of Thompson's layup. Referee Sean Wright gave Brown two technicals, resulting in an ejection with 3:14 remaining in the period.
''When you come into their building, you know you are probably not going to get too many calls,'' Brown said. ''I thought Tristan got hit when he went up to dunk the ball. He is 6-10 and he got bent backward like that. He doesn't bend backward because he missed a dunk.
''I thought he got hit. I lost it there.''
The Cavaliers used Brown's ejection as a rallying cry in the second half.
''We lost our leader with Coach Brown going out,'' Irving said. ''We pulled it together. We all believe in one another and that if we continue to fight and get stops we could tie it up and we did.''
The Cavaliers erased a 19-point deficit early in the third quarter and outscored the Heat 28-16 in the period.
Jarret Jack's jump shot with 8:03 remaining in the fourth gave the Cavaliers a 93-91 lead and their first advantage since midway through the first quarter. Cleveland increased the margin to four on Dion Waiters' layup with 7:24 remaining.
''Getting down early, we could have folded our tent,'' Jack said. ''But our guys put forth a tremendous effort in the second half.''
The Cavaliers began their comeback with a 19-7 third-quarter spurt and got to 78-73 on Irving's two free throws with 3:51 remaining in the period. Jack's jumper with 1:48 left narrowed Miami's lead to 81-78.
Miami built a six-point first-quarter lead and had its first double-digit advantage, 52-42, on Bosh's dunk with 5:15 remaining in the second period. The Heat had an 18-3 run in the quarter and led 68-52 after Wade scored 20 points in the first half.
Bosh scored 13 in the quarter and his layup with 2:11 remaining gave the Heat their largest lead of the half at 62-45.
''You need to credit the Cavs for staying with it, and they got second life and turned it into a heck of a basketball game,'' Heat coach Erik Spoelstra said. ''We were able to make enough plays on both ends and at the very end come away with a win, but that's something we certainly need to work on.''
Irving hit two early 3-pointers as the Cavaliers went 4 of 4 from behind the arc in the first 3:15 of the game. His second 3 with 8:15 remaining in the quarter put Cleveland ahead 15-14.
NOTES: Allen's first of two 3-pointers in the third quarter gave him 24,000 career points. ... Heat reserve forward Michael Beasley missed his fourth straight game because of a strained left hamstring. ... Cleveland's bench scored 53 points following Friday night's 60-point performance in Orlando. ... Anderson Varejao's fourth-quarter block gave him 354 in his career, surpassing Jim Brewer for eighth place in Cavaliers history.