The Detroit Pistons needed a final-second basket from Brandon Jennings to secure a 105-104 win over the San Antonio Spurs at the AT&T Center in the NBA.
The reigning champions appeared to be heading for a comfortable evening's work when they opened up an 18-point lead in the first half.
However, Andre Drummond and Greg Monroe led the fightback, combining for 37 to leave the game closely balanced heading into the final couple of minutes.
The Spurs made a run of three-pointers to keep themselves in the game as the visitors tried to pull away late on, while a free throw from Patty Mills left them three points clear with 10 seconds on the clock.
Jodie Meeks cut San Antonio's led to a single point when he was fouled though, making both free throws, before Jennings collected a wayward pass from Tim Duncan to burst back down the other end and seal the win with a jumper.
The result gives Detroit their sixth win in a row, while the Spurs slip to 21-15 this season.