Gloucestershire put in a much improved batting performance on day three but still face a daunting task to salvage a draw against Surrey.
Having been routed for 112 at Bristol and allowed the visitors to pile up 626 for six before declaring overnight, Gloucestershire reached 274 for five with a day remaining.
Michael Klinger made 120 and Ian Cockbain was closing on 50 but, still 240 behind, the hosts will have to bat virtually the whole final day to avoid defeat.
After falling to 17 for four within 10 overs of winning the toss on day one, it was vital Gloucestershire made a better start this time around.
An opening stand of 60 between Dan Housego and Klinger was just the ticket, the former setting the wheels in motion with a boundary off Matt Dunn's third ball and Klinger following suit in the young seamer's next over.
Twenty runs came from the first five overs and just eight were required before the half-century came up, Klinger taking Dunn for three boundaries in succession and four in an over.
— Surrey Cricket (@surreycricket) June 11, 2014
The expensive Dunn exacted a measure of revenge on the batsmen when he had Housego, on 27, caught by Zafar Ansari and Surrey grabbed a second wicket before lunch, Alex Gidman falling lbw to Gareth Batty having made 10.
Klinger was one run short of his half-century at the interval, with his team on 98 for two, and a single off Batty took him to an 88-ball fifty.
He found a willing partner in Hamish Marshall in a stand of 42 before the New Zealander was also trapped in front by Batty for 27.
As Cockbain established himself at the crease, Klinger continued to make solid progress and he moved into the nineties by hitting Batty for six.
He added his 13th four, off Jade Dernbach, to move to a 183-ball century shortly before tea.
He added another six off Batty but, having hit Jason Roy for two successive fours, he was dismissed by the part-timer as Hashim Amla took the catch at slip. Klinger batted for almost four-and-a-half hours and faced 229 balls.
Geraint Jones also occupied the crease well, lasting more than an hour for 13 from 47 balls before falling lbw to Dernbach, and it was left to nightwatchman Tom Smith to bat out the session alongside Cockbain, who will resume needing two runs to complete a fine half-century.