The Mavericks needed overtime to sneak past the Spurs after letting an 18-point, third-quarter lead slip away.
Dirk Nowitzki scored 10 points on 5-of-14 shooting in his return after a four-game injury absence with a sore right knee.
He also hauled down 13 rebounds as the Mavs stayed hot with their fifth win in six games.
San Antonio fell despite 19 points off the bench from Gary Neal, who led a contingent of reserves that pulled the Spurs back into the game.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Beyonce flaunts bikini body, Blue Ivy in vacation pics