MIAMI (AP) -- After sitting around for nearly a week, the Miami Heat expected to be a little less than razor-sharp.
It took an extra session, but the reigning NBA champions eventually found their groove.
Dwyane Wade scored 35 points, LeBron James got his 34th career triple-double and the Heat rallied from a 15-point deficit to beat theToronto Raptors 123-116 in overtime on Wednesday.
''It was typical for a team to come off a long road trip, have days off and try to get back in a groove, especially versus a team that offensively is one of the top 10 in the league in offense and scoring the ball,'' Wade said. ''It took us time to get our legs into it and get our rotations down, but as the game went on we were able to do that.''
James finished with 31 points, 11 assists and 10 rebounds for Miami, getting the last board on Toronto's final shot of the night. Wade added seven assists, including the one that set up Ray Allenfor the 3-pointer that clinched the win with 59.3 seconds left in overtime.
Allen scored 18, Mario Chalmers scored 14 and Chris Bosh had a 12-point, 12-rebound night for Miami. The Heat finished overtime on a 13-2 run, erasing a four-point hole in their first game in six nights.
''Just tried to keep wearing on them,'' James said. ''We knew it was going to take a little while to get the engines back started, but we got enough stops in the second half to give ourselves a chance to win.''
Alan Anderson scored 20 points for Toronto, leading seven Raptors in double figures. Jose Calderon scored 17, Terrence Rosshad 16, and Amir Johnson finished with 15 points.
Miami outrebounded Toronto 53-29, with Udonis Haslem also grabbing 10 rebounds for the Heat.
''I cannot fault our guys' effort,'' Raptors coach Dwane Casey said. ''They fought, they scrapped, they played with their hearts and they took one of the best teams in the NBA to the limit. That's what I said before the game. This game is about respect. This game's about going out there and not letting teams think they're going to come out and get their numbers against you. And our guys fought.''
Wade and Allen each had six points in overtime for Miami, which outscored Toronto 14-7 in the extra session. James had five rebounds in the final 5 minutes - after getting five in all of regulation.
The path to overtime was frantic, with neither team leading by more than three in the final 6:51 of the fourth quarter.
Calderon made a 3-pointer with 1:51 left to give Toronto a 105-103 lead; Bosh answered with a jumper to tie it. So Calderon connected on another 3, only to have that one rebutted by a 3-pointer by James, knotting the game once again.
And for good measure, after DeMar DeRozan went 1 for 2 from the line to put the Raptors up by one, Bosh followed with a 1 for 2 from the stripe to tie the game for the 13th time.
DeRozan missed a wild layup with 19 seconds left, and James' 20-footer at the buzzer bounced off the back iron - sending it to overtime.
''We've been competing against everybody,'' Calderon said. ''We're playing much better. We're sharing the ball. We can compete against everybody. We've got to compete every night. We've still got a couple guys out with injuries, but we'll be all right. When we play as a team, we're good. We don't have LeBron James.''
Toronto led 54-39 late in the second after a 19-9 run. Kyle Lowryhad seven points during the burst, Anderson added six - and both made four-point plays during the stretch.
But Miami closed to 57-50 by intermission, after a heads-up final few seconds from Shane Battier.
He made a 3-pointer late in the half, then stole Toronto's inbounds pass to give Miami a possession that led to a free throw by Bosh. Battier then contested Lowry's layup at the buzzer, forcing a miss before the break.
Toronto led by as many as 10 in the third, before the Heat got hot. Miami scored 30 points in the final 7:55 of the quarter - with Wade going 6 for 7 in the period, and the Heat outrebounding Toronto 13-3.
Still, it only added up to an 88-84 Heat lead entering the fourth.
''The biggest thing is winning,'' James said. ''That's what it's all about.''
NOTES: James passed Tom Chambers for 37th on the league's career scoring list. ... James had 10 points in the first quarter, the fifth straight game where the NBA's reigning MVP has reached double-digits in the opening period. It's the third time he's had such a streak in his career, with a run of six consecutive games in 2010 his longest. ... Toronto had no turnovers in the game's first 22 minutes. ... One of the loudest cheers in the first half came when the halftime score of the Miami-Duke game - the Hurricanes led 42-19 in a stunner at that point, in a game going on a few miles south in Coral Gables - was displayed on the scoreboards. Miami went on to a 90-63 victory.