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.
Dennis Rodman pledges to end trips to North Korea
Senate Democrats to pull all-nighter on climate change