MIAMI: With 27 seconds left and the Miami Heat leading by two, Dwyane Wade stood near the 3-point line and dribbled long enough for LeBron James to come over and set a screen on Dion Waiters.

When Wade dribbled around James, the entire lane opened and no Cavs player got in his way. In fact, Alonzo Gee seemed to step out of his way and open an even bigger path to the basket — because Gee was sticking with James rather than switching, as Cavs coach Byron Scott had instructed during a timeout 2½ minutes earlier.

Wade’s huge dunk with 24 seconds left propelled the Heat to a 109-105 victory over the Cavaliers in a game they probably should’ve won. The Cavs rallied from a 22-point deficit early in the third quarter to grab a one-point lead entering the fourth, then extended it to 97-89 on a 3-pointer from C.J. Miles with 5:16 left.

But just as the first meeting here in late November, the Cavs crumbled on both ends in the game’s final minutes, allowing the defending champions to escape and push their winning streak to 11.

It was the mental mistakes at both ends that had Scott aggravated.

“With five minutes to go in a basketball game and you have a chance to win, you’ve got to be focused,” Scott said. “As a basketball player, you’ve got to be totally focused on everything we’re talking about doing. You can’t come out there not knowing that we’re going to switch, not knowing what we’re going to run on the offensive end. Those breakdowns are unacceptable and they can’t happen.”

Scott said Gee and C.J. Miles were on the wrong side of the court coming out of a huddle late in the game, and therefore botched the play that was just diagrammed. Then the Cavs lost Shane Battier in transition and Battier stung them with a 3-pointer from the corner to give the Heat a 103-101 lead with 1:27 left. Then Gee failed to switch on the pick-and-roll that left Wade clear sailing for the easy dunk.

“Just a miscommunication,” Gee said.

The end spoiled what could’ve been a remarkable comeback. Scott told the players at halftime they looked scared. The Cavs fell behind by 20, cut it to seven, then watched the Heat build it back up to 20 late in the second quarter.

Miles made three 3-pointers in the third quarter and scored 11 points and Kyrie Irving had 10 in the quarter as the Cavs erupted for 36 points in the third. Miles finished with 19 points off the bench, Dion Waiters had 26 points and Irving had 17, but shot just 6-of-16.

Irving has been slowed the last couple nights by a sore right knee and conceded after the game it is still bothering him.

“It’s affecting my game,” Irving said. “But there’s not a lot of time to rest with back-to-backs.”

The Cavs have today off before another set of back-to-backs Tuesday and Wednesday at the Chicago Bulls and home against the Toronto Raptors.

Wade’s big finish capped a 15-point fourth quarter. LeBron James had 28 points, but scored just 3 in the fourth quarter – all from the free-throw line. Wade scored 24 and Mario Chalmers had 16.

It was another painful finish for the Cavs, who have lost six consecutive games at AmericanAirlines Arena and haven’t beaten the Heat here since James joined them. But they’ve been awfully close this year.

The Cavs led by seven with two minutes to play in November before losing on a Ray Allen 3-pointer with 18 seconds left. This time the lead was 8 points with five minutes left.

“[Mental mistakes] can’t happen anymore this season,” Scott said. “We had our opportunity against a very good basketball team, against the world champions. And we lost the game because of mental mistakes. That’s something we just can’t have happen again.”

Jason Lloyd can be reached at jlloyd@thebeaconjournal.com. Read the Cavs blog at https://ohio.com/cavs. Follow him on Twitter http://www.twitter.com/JasonLloydABJ. Follow ABJ sports on Facebook at http://www.facebook.com/sports.abj.