Shai Gilgeous-Alexander scored a career-high 42 points and Lu Dort hit a 3-pointer as time expired to give the Oklahoma City Thunder a 102-99 win over the San Antonio Spurs on Wednesday night.

San Antonio turned the ball over with 3.9 seconds remaining, giving Oklahoma City the ball with the score tied. Dort's corner 3-pointer dropped as the buzzer sounded, and his teammates mobbed him.

Gilgeous-Alexander, one of the NBA's highest-scoring players to be left off the All-Star rosters, made 13 of 20 field goals, 10 of 11 free throws and shot 6 of 11 on 3s.

Oklahoma City Thunder guard Shai Gilgeous-Alexander shoots between San Antonio Spurs guard Tre Jones, left, forward Trey Lyles, second from left, and guard Patty Mills, right, during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Oklahoma City Thunder guard Shai Gilgeous-Alexander shoots between San Antonio Spurs guard Tre Jones, left, forward Trey Lyles, second from left, and guard Patty Mills, right, during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Dort and Al Horford each scored 16 points for the Thunder.

Dejounte Murray had 27 points and Patty Mills added 15 for the Spurs.

San Antonio hadn't played since Feb. 14 because of health and safety protocols, and the Spurs were still depleted. DeMar DeRozan, the team’s leading scorer, sat out for personal reasons. Rudy Gay, Keldon Johnson, Devin Vassell, Quinnary Witherspoon and Derrick White were out because of health and safety protocols.

Oklahoma City Thunder center Mike Muscala (33) dunks over San Antonio Spurs forward Drew Eubanks (14) during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Oklahoma City Thunder center Mike Muscala (33) dunks over San Antonio Spurs forward Drew Eubanks (14) during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Gilgeous-Alexander took over in the third quarter. He hit a 3-pointer while being fouled, and his free throw cut San Antonio's lead to 53-51. He later drained a 3 to tie the game at 65. His layup at the end of the third as time expired put Oklahoma City up 76-73. He scored 21 points in the period on 5-for-5 shooting from the field and 8-for-9 shooting from the free throw line.

Horford's 3-pointer on an assist from Gilgeous-Alexander put the Thunder up 87-86 with about seven minutes remaining, and the game remained close from there.

TIP-INS

Oklahoma City Thunder guard Shai Gilgeous-Alexander (2) shoots over San Antonio Spurs guard Patty Mills, right, during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Oklahoma City Thunder guard Shai Gilgeous-Alexander (2) shoots over San Antonio Spurs guard Patty Mills, right, during the second half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

Spurs: LaMarcus Aldridge returned after missing six games due to hip soreness. He had 11 points and seven rebounds. ... San Antonio went 5 of 10 on 3-pointers in the second quarter. ... The Spurs made 10 of 15 free throws.

Thunder: Made six 3-pointers in the first quarter while holding the Spurs to one. San Antonio didn't make one until the final minute of the period. ... Missed all seven of their 3-point tries in the second quarter. ... Hamidou Diallo did not play in the second half because of left groin soreness.

UP NEXT

San Antonio Spurs guard Dejounte Murray (5) shoots as Oklahoma City Thunder forward Darius Bazley (7) defends during the first half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

San Antonio Spurs guard Dejounte Murray (5) shoots as Oklahoma City Thunder forward Darius Bazley (7) defends during the first half of an NBA basketball game Wednesday, Feb. 24, 2021, in Oklahoma City. (AP PhotoSue Ogrocki)

The Spurs host the New Orleans Pelicans on Saturday.

The Thunder host the Atlanta Hawks on Friday.

Follow Cliff Brunt on Twitter: https://twitter.com/CliffBruntAP.

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports.