Hashim Amla hit a fighting 88 to help Surrey complete a vital four-wicket win against fellow strugglers Derbyshire which boosts their chances of avoiding relegation from LV= County Championship Division One.
Set an awkward victory target of 217 in 73 overs, Surrey slipped to four for two against a tenacious Derbyshire bowling attack on a tricky pitch that produced a relatively low-scoring contest.
But South Africa batsman Amla, rated at number one in the ICC world rankings for both Test and one-day international cricket, batted for 202 minutes and faced 159 balls, hitting eight fours in just his fourth championship innings as Surrey's latest overseas player.
He was joined in battling stands of 84, 58 and 45 by Vikram Solanki, Zander de Bruyn and Steven Davies respectively.
The win, Surrey's first of the championship season, earned them 21 points and puts them on 97, two ahead of Derbyshire at the bottom of top tier. Surrey remain 15 points adrift of seventh-placed Somerset with a game in hand.
The visitors began the final day 161 runs ahead at 231 for seven, and they added another 55 mainly through the continuation of a fine eighth-wicket stand between Tom Poynton and David Wainwright.
They had put on 93 in 34 overs when Poynton was well held off bat and pad for a determined 141-ball 49.
It was the first of three wickets in nine balls for Gareth Batty, at the cost of just one run, as Surrey's off-spinner and captain quickly wrapped up the innings for 286 to finish with 5-71.
Matt Higginbottom chipped tamely to mid-on and last man Mark Footitt also fell for one when he edged Batty to de Bruyn at slip. Wainwright was left on 54 not out, an excellent innings spanning 107 balls.
A win for Surrey looked a long way off when Rory Burns was brilliantly caught at wide mid-off for four by a sprawling Wayne Madsen off Footitt in the third over and Arun Harinath safely pouched for a duck by Shivnarine Chanderpaul at first slip off Higginbottom in the next over.
Amla, however, settled in calmly and Solanki also looked assured as he added 44 to his first-innings 93.
One straight drive off Wainwright's left-arm spin flew high for six and Solanki had hit five fours too from 72 balls when, much to his evident disgust, he was adjudged lbw to Footitt as he moved across his stumps to the left-arm paceman, who was bowling from around the wicket.
That left Surrey 88 for three, but it would have been worse for them had Alex Hughes not dropped Amla on 24 at short extra cover off Wainwright when the total was 60. The fielder held his head in his hands in despair after failing to hold on to the ball with a juggling effort.
And the miss grew ever more costly as Amla and de Bruyn took Surrey on to 146 before the latter cut loosely at Hughes' medium pace and nicked a catch to keeper Poynton.
To rub salt into Hughes' wound, Amla drove him for two lovely fours in the same over, past mid-on and through extra cover yet, with just 26 more runs needed, he was caught at slip off Wainwright.
Davies also fell before victory was clinched, edging to Madsen at slip on 18 as he drove at Wainwright, before Zafar Ansari and Batty knocked off the remaining runs required with no further alarms.