Vikram Solanki fell seven runs short of a century as Surrey claimed a 70-run first-innings lead on day two of their crunch relegation clash with Derbyshire at the Oval.
Solanki's 93 held the Surrey innings together, but four wickets from left-arm seamer Mark Footitt limited the home side to just two batting points as they folded to 289 all out.
Solanki, who batted for 176 minutes, faced 141 balls and hit 14 fours and a six for his 93, shared in a crucial fourth-wicket stand of 96 in 22 overs with Zander de Bruyn.
But on a pitch offering encouragement to the bowlers David Wainwright took 3-46 with his left-arm spin before Footitt (4-50), helped to polish off the Surrey tail.
Following the departure of Arun Harinath, who was leg before to Footitt in the second over of the day, Rory Burns and Hashim Amla (16) took advantage of anything short and wide of off stump before the latter edged a drive to third slip.
Solanki hit five boundaries in as many overs from Alex Hughes, who was also pulled for four by Burns, who fell shortly after lbw to Peter Burgoyne to a ball that hurried on.
Without looking completely at ease, Solanki and De Bruyn registered the first 50-run alliance of the match.
Solanki brought up an 89-ball half-century with a straight six but, just when it looked as if De Bruyn had also got to grips with the bowling, he chose the wrong delivery to pull and was lbw to Wainwright for 40.
Steven Davies was fortunate to survive a chance at short extra cover, on four, but Solanki continued to dictate terms until he drove at Wainwright and the ball rolled on to his stumps via a boot.
Wainwright struck again shortly after tea when Davies was caught at short mid-wicket for 29 but a crucial 47-run partnership between Zafar Ansari and captain Gareth Batty edged Surrey ahead.
Batty secured a second batting point for his side by lifting Burgoyne over wide mid-on for four. But having just driven Matt Higginbottom straight down the ground, the Surrey captain was lbw for 35.
Chris Tremlett, pushing forward, was caught behind off Footitt, who then removed Tim Linley's middle stump. With George Edwards bowled shouldering arms to Higginbottom, Ansari was left stranded on 18.
The day ended with the visitors 13 without loss in their second innings, so they will go into day three trailing by 57.