The San Antonio Spurs beat the Los Angeles Lakers 99-96 on Friday night in San Antonio, erasing a 20-point second-quarter lead to clinch a spot in the NBA Cup quarterfinals — and knocking the Lakers out of the tournament. It was a battle between the top two teams in the Western Conference, and it ended as a duel between the two players at the center of this season’s MVP race: Victor Wembanyama and Luka Doncic.

Wembanyama finished with 25 points, 16 rebounds, four steals and two blocks. Doncic led all scorers with 31 points, six rebounds and eight assists. The difference was not the stars’ totals — it was the second half, which San Antonio won 61-42 after trailing by 16 at the break.

THE COMEBACK MATHS

The Lakers’ lead peaked at 20 points. A jumper by Collin Sexton with 4:43 left before halftime pushed Los Angeles 20 clear, and the Spurs went into the break down 54-38 — their lowest-scoring half of the season. In the first quarter alone, San Antonio shot 38.9% from the floor and committed six turnovers while the Lakers sprinted to a 27-14 lead.

Then the game flipped, and the numbers show how hard it flipped. San Antonio won the third quarter 30-14. The Lakers shot 25% in the period and missed nine of their final 10 shots of it. Wembanyama had nine points and grabbed six rebounds in the quarter alone, and Keldon Johnson’s three-pointer with 1.8 seconds left tied the game at 68-68 going into the fourth. A 20-point lead had become nothing in 24 minutes of basketball.

The final minute was decided at the free-throw line. Wembanyama’s free throw with 57 seconds left, followed 14 seconds later by Stephon Castle’s stepback three-pointer, pushed the Spurs ahead 96-90. Austin Reaves answered with a three with 33 seconds left, and Jake LaRavia’s two free throws with 7.7 seconds remaining made it a one-point game. De’Aaron Fox was fouled with 6.6 seconds left and made both free throws; Quintin Grimes made just one of two from the line at the other end, Wembanyama grabbed the rebound and was fouled, made one of two — and the Lakers’ last-second heave was off the mark.

THE KEY NUMBERS

Final score: San Antonio Spurs 99, Los Angeles Lakers 96. Quarter by quarter — Q1: 14-27. Q2: 24-27. Q3: 30-14. Q4: 31-28. The Lakers led by 20 in the second quarter and by 16 at halftime; the Spurs outscored them 61-42 in the second half.

The MVP duel: Wembanyama 25 points (10-of-25 shooting), 16 rebounds, four steals, two blocks. Doncic 31 points, six rebounds, eight assists, three steals — but 1-for-13 from three-point range. Doncic scored more; Wembanyama did more. That is the whole argument in one line: the Lakers’ star won the scoring, the Spurs’ star won the game.

The support acts: Stephon Castle led San Antonio with 26 points on 10-of-15 shooting and nine assists. Dylan Harper added 14 points off the bench in his return from a hip injury, and De’Aaron Fox had 12. For Los Angeles, Reaves scored 21, Sexton 12, and Walker Kessler had 10 points and 13 rebounds; LaRavia finished with 10.

The stakes: San Antonio improved to 16-4 and Los Angeles fell to 15-4 — still the top two records in the West. In the NBA Cup, the Spurs finished group play 3-1 and advanced to the quarterfinals as the West’s wild-card team on point differential. The Lakers finished 2-2 and were eliminated from the in-season tournament.

THE STORY SO FAR

First quarter — The Lakers sprint to a 27-14 lead. San Antonio shoots 38.9% and turns the ball over six times. Doncic already has the game bending his way.

Second quarter — Sexton’s jumper with 4:43 left makes it a 20-point game. The Spurs fight back to within 54-38 at halftime, but it is their lowest-scoring half of the season, and Doncic leads all scorers with 19 at the break.

Third quarter — The flip. Wembanyama scores nine and grabs six rebounds in the period as San Antonio wins it 30-14. The Lakers shoot 25%, miss nine of their last 10 shots, and Johnson’s three with 1.8 seconds left ties it at 68.

Fourth quarter — The game stays tight to the final minute: Wembanyama’s free throw and Castle’s three put San Antonio up 96-90 with 43.4 seconds left, Reaves and LaRavia drag it back to a one-point game, Fox’s free throws restore the cushion, and the Lakers’ last heave misses. Spurs 99, Lakers 96.

WHAT HAPPENS NEXT

The Spurs move on to the NBA Cup quarterfinals, where the knockout round begins — the reward for finishing 3-1 in West Group C and winning the wild card on point differential. The Lakers are out of the Cup at 2-2, but their season is not: at 15-4 they remain one of the two best teams in the West, one game behind the Spurs.

The other race this game fed is the one USA Today named before tip-off: who between Wembanyama and Doncic is more of the favorite to be the league’s Most Valuable Player five months from now. Friday did not settle it — Doncic outscored him, Wembanyama outplayed him when it mattered — but it gave both sides their best evidence yet, and it gave the Spurs the top spot in the West. The next meeting between these two will carry all of that with it.