The Grizzlies (40-30) led for all but 48 seconds in the second half to hand the Spurs (52-16) their ninth road loss this season. San Antonio, which had won 11 of its previous 13 games, got 22 points from Kawhi Leonard and 21 from LaMarcus Aldridge.
The Spurs outshot the Grizzlies 44 to 42 percent and won the battle on the boards 42-35, but Memphis used its long-range shooting to get the win over the team with the league's best defensive rating.
San Antonio was attempting to beat a 28th different team this season, but was unable to handle the combination of grit-and-grind and pace-and-space the Grizzlies employ under new coach David Fizdale.
Memphis led 44-43 entering the third quarter and built a seven-point lead midway through the period after JaMychal Green went on an eight-point scoring spree.
But the Grizzlies were ahead only 75-73 entering the fourth quarter.
Much like he did in the first quarter, Randolph went on a personal scoring run (seven straight points) and the Grizzlies were up 87-78 with eight minutes left.
The Spurs cut the Memphis advantage to three on several occasions, but could get no closer. The Grizzlies built an 11-point lead with 2:30 left when Gasol drove the lane for a layup and completed the three-point play for a 98-87 margin.
The Grizzlies led, 29-18, after the first quarter, getting nine points from Randolph in the final four minutes to go up by double digits.
San Antonio erased the deficit to open the second quarter by scoring 11 straight points, trying the game at 29 on a fast break dunk by Dewayne Dedmon.
Neither team created much separation the remainder of the quarter, although the Grizzlies built a four-point lead at 42-38 late in the period on a Tony Allen putback.
Leonard's 19-foot jumper at the halftime buzzer trimmed the Memphis lead to 44-43.
NOTES: The Grizzlies signed G/F Wayne Selden Jr. to a multi-year contract for the rest of the season Saturday. Selden was in the team's training camp earlier this season and had been playing for the Iowa Energy, the Grizzlies' NBA Development League affiliate. He averaged 18.5 points, 4.8 rebounds and 2.9 assists in 35 games for Iowa. To make room on the roster, the Grizzlies waived G Toney Douglas, who had appeared in 24 games as a reserve and averaged 4.9 points. ... The Spurs have gone 16-5 since dropping back-to-back games Jan. 27 and 29 to the New Orleans Pelicans and Dallas Mavericks. Saturday's loss to the Grizzlies was the second time they've lost back-to-back games since late January. ... In another roster move, the Grizzles recalled C Deyonta Davis from the Iowa Energy. Davis was averaging 10.8 points and 8.3 rebounds for the Energy. ... F Kawhi Leonard finished in double figures for the 95th straight game, the longest streak by a Spur since David Robinson's streak ended at 157 games in 1996.