MIAMI (AP) -- Dwyane Wade scored 28 points, including two free throws with 1.5 seconds left as the Miami Heat topped the Oklahoma City Thunder 97-95 on Thursday in a wild, back-and-forth game that featured 38 lead changes.
In Wade's 13-season career with the Heat, no Miami game ever had more than 31 lead changes.
Chris Bosh scored 16 points, Goran Dragic added 14 and Josh McRoberts scored 12 for Miami, which survived when Russell Westbrook's 3-point try from the right wing bounced off the backboard as time expired.
Westbrook and Kevin Durant each scored 25 for Oklahoma City, which missed a pair of 3 pointers in the final 10 seconds. Durant missed a 3-pointer and Bosh grabbed the rebound, calling time with 7.7 seconds remaining.
Denver's Will Barton came off the bench to score 22 points and Danilo Gallinari added another 21 as the Nuggets stopped an eight-game losing streak by beating the Toronto Raptors 106-105.
Denver avoided its first nine-game losing streak since the 2002-03 season, when it dropped 14 in a row.
Joffrey Lauvergne had 14 points and 10 rebounds for the Nuggets, who made all 18 of their foul shots.
DeMar DeRozan scored a Raptors' season-high 34 points and Kyle Lowry had 16.
In Mexico City, Isaiah Thomas tormented his former team, scoring 21 points and leading the Boston Celtics over the Sacramento Kings 114-97 in the NBA's third regular-season game played in Mexico.
Thomas, who played for the Kings from 2011-14, scored 19 points in the first half. He shot 8 for 14 overall and had nine assists as the Celtics won for the fourth time in five games.
Kelly Olynyk added 21 points for the Celtics while Avery Bradley and Jae Crowder each had 20.
Rudy Gay scored 18 points and DeMarcus Cousins added 16 for the Kings.
The Orlando Magic downed the Utah Jazz 103-94 for their fifth straight win and best streak since January 2012 after Tobias Harris scored 17 points and had seven rebounds.
Gordon Hayward led the Jazz with 24 points, five rebounds, four assists and two steals.
Kawhi Leonard scored 27 points, shooting 7 for 9 on 3-pointers as the San Antonio Spurs defeated the Memphis Grizzlies 103-83, while Portland's Damian Lillard had 26 points and backcourt partner CJ McCollum added 21 as the Trail Blazers ended Indiana's six-game winning streak 123-111.