In a game with 13 ties and 13 lead changes, the Oklahoma City Thunder missed two shots in the final seconds that could have tied the game and lost to the Miami Heat 110-108 on Wednesday night in downtown Oklahoma City.

Tyler Herro hit a jumper with four seconds left to break a 108-108 tie and give the Heat the lead.

OKC had a chance to tie, but Shai Gilgeous-Alexander had a shot blocked, and Josh Giddey got the rebound, but missed a shot underneath the basket in heavy traffic as the buzzer sounded.

The Thunder trailed by as many as 21 points in the first half, trimmed the deficit to 12 by halftime, then used a 10-0 run to get back in the game.

It was a 22-3 spanning the two halves, and the lead went back and forth after that.

Miami’s Tyler Herro made a three-pointer with 1:27 left to tie the game at 106.

Herro finished with 35 points with nine three-pointers.

Miami then took the lead when they got a steal and former Thunder star Victor Oladipo got a layup and was fouled to give the Heat a 108-106 lead with 1:06 to play.

The Thunder outshot the Heat 50 percent to 43 percent from the field, but Miami made 24 three-pointers.

SGA had 27 points to lead the Thunder, and added 8 rebounds and 7 assists.

Josh Giddey had 19 points, 11 rebounds, and 7 assists.

The other three OKC starters also scored in double figures, with Luguentz Dort scoring 18 points with four three-pointers, Jalen Williams 14 points, and Darius Bazley 12 points in his first start of the season.

OKC has lost four games in a row to fall to 11-17 on the season.

The game was the first of a franchise-long seven-game homestand, which continues Friday when the Thunder host Minnesota at 7:00 pm.

By Brian Brinkley