The San Antonio Spurs erased a 20-point deficit to beat the Los Angeles Lakers 99-96 on Friday and punch their ticket to the NBA Cup quarter-finals on the final night of group play.
Victor Wembanyama scored 25 points and grabbed 16 rebounds, adding two assists, four steals and a pair of blocked shots to fuel the Spurs in the battle between the Western Conference's top two teams.
Luka Doncic scored 31 points to lead the Lakers, but Los Angeles were eliminated from the in-season tournament.
San Antonio advanced as a wild card with a win that allowed Portland - 116-94 winners over the Golden State Warriors - to clinch the victory in West group C.
Seven of the eight quarter-final Cup berths were still up for grabs going into Friday's games.
The Spurs left it late, but after scoring just 38 points in the first half they out-scored the Lakers 30-14 in the third quarter to turn the tide.
Stephon Castle led San Antonio's scoring with 26 points, coming up with a pair of big three-pointers in the fourth quarter. De'Aaron Fox and Wembanyama drained clutch free throws in the waning seconds to seal the win.
"We're battle tested," Castle said. "We win big games and we stick together when it's tough for us."
Doncic was involved in a testy exchange with a fan as he left the court, tossing his wristband toward a woman without looking, backtracking to retrieve it and getting a shove from a man next to her.
"I just threw my wristband, like I do almost every game," Doncic said. "And then I heard she didn’t want it so I went back to grab it. And then he pushed me. And then I gave it to somebody else."
In the quarter-finals the Spurs will play the Dallas Mavericks, who beat the Phoenix Suns 113-109 to finish 4-0 in group play.