BOSTON (AP) — Al Horford made a hook shot with 3.7 seconds left to give Boston its only lead of the game, and the Celtics rallied from a 26-point deficit to beat the Houston Rockets 99-98 on Thursday night.

Kyrie Irving scored 26 and Jayson Tatum finished with 19 for the Celtics, while Marcus Smart drew two offensive fouls against James Harden in the closing seconds to help Boston complete the comeback.

Smart and Terry Rozier had 13 points apiece.

Tatum made a layup with seven seconds left to pull the Celtics within 98-97, then Smart had position on Harden for an offensive foul that gave Boston the ball and a chance to win it. Horford converted from the lane to put Boston up for the first time in a game Houston had led throughout and dominated until midway through the third quarter.

Harden finished with 34 points and 10 assists. Eric Gordon scored 24 points for Houston, which shot 25 percent (9 of 36) in the second half and lost its fourth straight.

Bledsoe had six points and made two key assists down the stretch and the Bucks found their missing defense, holding the Timberwolves to a season-low 12 points in the fourth quarter. Minnesota went cold over the last 4:21 and had its five-game winning streak snapped.

Bledsoe took a pass from Antetokounmpo and made an open 3-pointer from the corner to give the Bucks their first lead of the game at 95-93 with 2:25 to go. Bledsoe followed with a three-point play and then found Antetokounmpo under the basket for an easy two points, pushing the lead to 100-93 with 1:04 left.

Minnesota perhaps wore down a night after a 128-125 overtime victory over Denver and had a four-game road winning streak snapped.

The Spurs improved to 17-2 at home while winning their third straight overall.

The Spurs were without Kawhi Leonard and lost Rudy Gay to a foot injury only two nights after playing with a full roster for the first time all season. Leonard sat out for rest. Gay exited the game late in the third quarter with a sore right heel.

Kyle Anderson had 16 points and eight rebounds starting in place of Leonard. Tony Parker scored 14 points, including 10 in the first quarter as San Antonio bolted to an early lead.

Reserve forward Michael Beasley led New York with 23 points. Courtney Lee and Kristaps Porzingis had 18 points apiece, but Porzingis fouled out late in the fourth.