Miami, FL (Sports Network) - Dwyane Wade scored 35 points and LeBron James recorded a triple-double, as the Miami Heat fended off the Toronto Raptors, 123-116, in overtime.

James finished with 31 points, 11 assists and 10 rebounds, but missed a shot at the buzzer that could have given the Heat the victory in regulation.

Wade then scored six points in the extra session and Miami ended the game on a 13-2 run -- highlighted by two 3-pointers from Ray Allen -- to win its third straight game.

Allen poured in 18 points off the bench, while Chris Bosh chipped in 12 points and 12 rebounds in the Heat's ninth straight win over Toronto.

The Raptors, playing their third overtime game in a week, shot 13-of-25 from 3-point range in regulation, but just 1-of-6 thereafter. They had seven players score in double figures, led by Alan Anderson's 20-point effort.

It was a two-possession game the entire fourth quarter with three lead changes in the final four minutes.

Toronto's Jose Calderon beat the shot clock with a 3-pointer for a 105-103 lead with 1:51 to go, then followed Bosh's tying mid-range jumper with another from behind the arc. James answered with a trifecta of his own, and DeMar DeRozan and Bosh exchanged 1-of-2 trips to the foul line down the stretch.

Miami retained possession after the Bosh's missed free throw, but James threw the ball away when he and Wade miscommunicated at the top of the key.

Coming out of a timeout, DeRozan missed a driving layup with under 20 seconds to play, and Miami was able to hold for the final shot in regulation. James dribbled out the remaining time at the top of the key, then settled for a contested 21-footer that found the back of the rim.

Wade made a go-ahead runner in the lane with two minutes to play in regulation, then added two free throws for a 117-114 lead. Allen followed a Calderon miss with a 3-pointer from the corner, and the Heat held on from there.

"I thought we did well in a lot of area early, but in the end we didn't get the win," Raptors head coach Dwane Casey said.

The Heat, after five full days off since beating the Lakers last Thursday, started off slow, especially defensively, as Toronto shot 12-of-19 (63 percent) from the field in the first quarter en route to a 28-22 lead.

Kyle Lowry made two 3-pointers during a 9-0 run midway through the second to extend the lead to 46-32, and it was a 15-point game before the Heat scored 11 of the half's final 14 points to pull within 57-50.

Miami continued its surge with a 38-point third quarter behind 14-of-18 (78 percent) shooting from the floor. Wade netted 14 in the frame and assisted on an alley-oop dunk with James during a 13-0 run that gave the Heat a 76-73 lead.

"We were a step slow...early in the game," James said. "It definitely took us a half to get back into the flow of things."

Game Notes

James, who has 34 career triple-doubles, has scored in double figures in five consecutive first quarters after netting 10 in the opening frame ... Miami owned a 53-28 rebounding advantage and has won 37 straight games when outrebounding its opponent by double figures ... Calderon had 17 points ... The Raptors made half of their 88 field goal attempts, falling to 4-1 this season when shooting 50 percent or better.