Andrea Bargnani scored a season-high 25 points, Jermaine O'Neal finished with 16 points and 17 rebounds, and the Toronto Raptors overcame a huge night by Dwyane Wade to beat the Miami Heat 101-95 on Wednesday night. Anthony Parker scored 19 points, and Chris Bosh added 15 points and 11 rebounds for the Raptors, who blew a 17-point, late-third-quarter lead but ultimately scrambled to beat Miami for the second time in four days. Wade had season highs of 40 points and 11 assists for Miami, his fifth time scoring 30 or better in his last nine outings. But not even he could overcome the inside-outside game of the Raptors, who hurt Miami inside during the first half, then put on a sizzling 3-point display after intermission, going 8-for-8 in the final 24 minutes. Shawn Marion added 20 points and 14 rebounds for Miami. Daequan Cook scored 10 for the Heat. Toronto went 6-for-6 from 3-point range in the third quarter, outscored Miami 13-2 during one stretch in that period and led 76-59 when Bargnani made three free throws -- he got fouled beyond the arc -- with 2:02 remaining in the period. On Miami's next defensive possession, Wade drew a flagrant foul for hitting Toronto's Kris Humphries in the face. It was the slap Wade needed. Wade scored Miami's last eight points of the third, getting the Heat within 77-67 entering the final 12 minutes, and he wasn't done. He had a dunk to open the fourth, then another with 8:43 left to give Miami its first lead since the opening quarter, 84-83. Miami scored on seven straight possessions to open the final quarter, scoring a mindboggling 23 points in a 5-minute span. But it wasn't enough. After Wade's jumper with 1:02 left got the Heat within three, Parker finished off his 5-for-5 night from 3-point range on the next Toronto possession, connecting with a dagger that pushed the Raptors' lead to 99-93 and sealed the win. Early on, it looked like Toronto would simply pound their way inside to an easy win. The Raptors ran out to a 17-6 lead, exploiting their size edge. Michael Beasley, Cook and Joel Anthony all had two fouls by the end of the first quarter -- Beasley got his two in the first 72 seconds. And Anthony, Miami's best big-man defender off the bench, got his third against Bosh with 10:20 left in the half. Beasley's third came 1:53 later, when he tried to split two defenders as the shot clock ran down and got called for charging. Miami missed 11 straight shots in the first quarter, but found a way to hang around, trailing by only four at halftime and setting itself up for the big second-half run. But by taking the paint away, the Heat left the perimeter open, and it was enough for Toronto to take advantage.