The Spurs led by as many as 18 points in the first half, but failed to pull clear in the closing stages as they made just four-of-eight from the free-throw line in the final two minutes.
Detroit reduced the NBA champions’ advantage to 104-103 on a pair of Jodie Meeks free throws with eight seconds to play.
After a 20-second timeout, Spurs veteran Tim Duncan threw an inbound pass behind team-mate Patty Mills – the Spurs??? 17th turnover of the game – and Jennings banked in a shot at the other end with just 0.1 seconds remaining to lift the Pistons to their sixth straight win.
The Spurs had won two successive games after a disappointing December that saw them post a losing record for the month.
They welcomed back French point guard Tony Parker, who had missed 13 of the last 16 games with a hamstring injury.
But Parker, who sat out the Spurs’ previous five games, had a quiet night on his return, playing just under 13 minutes and scoring three points with two assists and two turnovers.
Andre Drummond led the Pistons with 20 points and 17 rebounds, while DJ Augustin added 19 off the bench, and Greg Monroe contributed a double-double of 17 points and 11 rebounds.
Meanwhile, a 16-4 run spanning the end of the third and start of the fourth quarters was the difference for the Phoenix Suns as they opened a four-game road trip with a 102-96 win over Milwaukee.
Markieff Morris led Phoenix with 26 points and 10 rebounds, while Goran Dragic scored 16 and Eric Bledsoe finished with 10.?? ?? ?? ?? ?? ?? ??
Milwaukee were led by 26 points from Brandon Knight as Larry Sanders missed his seventh straight game due to personal reasons, although he was with the team before the game.