The Mavericks hadn't beaten their Texas rivals in San Antonio since November 26, 2010.
The Spurs lost a second straight game for the first time since November, and endured their first home defeat after holding at least a 10-point halftime lead since March 7, 2008.
LeBron James surpasses major career milestone
The Mavericks were up 100-92 with 3:48 to play after the second of back-to-back jump shots from Harrison Barnes.
San Antonio's LaMarcus Aldridge hit two free throws and a dunk — assisted by Danny Green — as the Spurs narrowed the gap to 100-96 with 2:15 remaining.
Two free throws from Kawhi Leonard trimmed the deficit to 100-98 before the Mavs' Wesley Matthews made one of two from the free throw line to make it a three-point lead with less than a second remaining.
Rockets tear Nets apart as Harden shines
After Leonard missed a jump shot, Curry powered through the Spurs defense for a basket that made it 103-98.
San Antonio's Manu Ginobili drained a three to narrow the gap again, but Yogi Ferrell, who signed a 10-day contract with the Mavericks some 36 hours earlier, made two free throws with 7.3 seconds left to seal the win.
Ferrell, who was undrafted out of college, played 10 games with the Brooklyn Nets this season but has toiled mainly in the developmental league.
He was a surprise starter in his first game with his new team and finished with nine points and seven assists.
Antetokounmpo show not enough to save Bucks
After a couple of early defensive mistakes guarding Tony Parker he settled down and did a solid job on San Antonio's veteran point guard, admitting he was nervous when he got the starting nod.
"It was eye-opening for me when coach told me," he said. "But as the game went on, I just started playing."
Injuries to Deron Williams, JJ Barea and most recently, the waiving of Pierre Jackson, gave Ferrell his opportunity.
"Give Yogi a lot of credit," said Mavericks star Dirk Nowitzki. "First game, starting against Tony Parker and he made two big free throws down the stretch. He's a fighter. He's strong in there. That was fun to watch."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ