MEXICO CITY — Isaiah Thomas tormented his former team, scoring 21 points and leading the Boston Celtics over the Sacramento Kings 114-97 Thursday night 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, helping the Celtics win for the fourth time in their last 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, who lost for the third time in their last four games.

Rajon Rondo, playing against his former team for the second time in his career, was sent off in the third quarter after a double technical foul and finished with five points for the Kings.

Rondo also faced the Celtics last season, when he was playing for the Dallas and scored 29 points in 119-101 win.

NUGGETS 106, RAPTORS 105: Will Barton came off the bench to score 22 points and Danilo Gallinari added another 21 as the Denver Nuggets stopped an eight-game losing streak, beating the Toronto Raptors 106-105 Thursday night.

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.

DeMar DeRozan scored a Raptors season-high 34 points and Kyle Lowry had 16.

The Nuggets never trailed, with Gallinari’s jump shot 1:41 into the game putting them ahead to stay. A desperation 3 by Lowry as time expired closed the final deficit to one point.

Toronto appeared to make a game of it by starting the third quarter on an 11-3 run. But Gallinari made three 3-pointers and the Nuggets led by 10 going into the final period.

Rookie point guard Emmanuel Mudiay had eight assists in the first half and Denver shot at a 47.8 percent clip, taking an 18-point lead.

HEAT 97, THUNDER 95: Dwyane Wade scored 28 points, including two free throws with 1.5 seconds left that put host Miami ahead to stay in a wild back-and-forth game that featured 38 lead changes and 11 ties.

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.

NOTES

HAWKS: Guard Tim Hardaway Jr., acquired during the NBA draft for a first-round pick, has been assigned to Canton of the NBA Development League.

Hardaway has played in just four games as he has struggled to earn a role in Coach Mike Budenholzer’s rotation.

CAVALIERS: All-Star guard Kyrie Irving is fully cleared to practice and said he’s made “the biggest step” in his comeback from a broken left kneecap.

Irving didn’t disclose a date for his season debut, but said he’s made significant progress.