A high class innings of 88 from Hashim Amla helped steer Surrey past their 217-run victory target at the Kia Oval.
Derbyshire were well in the game when Mark Footitt and Matt Higginbottom reduced the home side to 4-2 early in their run-chase with Wayne Madsen taking a fine catch at extra-cover to dismiss Rory Burns.
But a stand of 84 between Amla and Vikram Solanki (44) put Surrey back on the straight and narrow and, although Solanki was lbw to Footitt at 88-3, Zander de Bruyn was just the experienced foil his South African team-mate needed.
Dropped in the 20s by Alex Hughes, Amla made the most of his good fortune to pass 50 in 111 balls with four fours.
De Bruyn, meanwhile, recovered from a cagey start to post 31 off 73 balls before he was caught behind off Hughes at 145-4.
Steve Davies (18) was next to contribute and - by the time Amla was out, caught at slip off Wainwright for 88 - the home side were within 26 runs of victory.
A further 17 were needed when Wainwright repeated the dose to remove Davies – leaving Gareth Batty (6*) and Zafar Ansari (11*) to nudge Surrey over the line at 218-6.
Tom Poynton (49) and Wainwright (54 not out) had earlier taken their 8th wicket partnership to 93 as the duo dug in to ensure a competitive run-chase in an innings total of 286 all out. Wainwright reached his half-century off 103 balls with three fours.
Gareth Batty wrapped up the innings to finish with 5 for 71 and take the 500th wicket of his first-class career.
But the Surrey skipper had more important things to celebrate at the end of the match as his side stayed very much in the hunt for survival.
© 2014 Derbyshire County Cricket Club
The 3aaa County Ground, Grandstand Road, Derby DE21 6AF. Tel: 01332 388 101
Website design by: www.thisismedia.co.uk