Graeme Smith hit his first century for Surrey as they beat Gloucestershire by four wickets in LV= County Championship Division Two at the Kia Oval.
The hosts were set 267 to win, Smith's excellent 103 setting them on their way before three quick wickets temporarily gave Gloucestershire hope.
Steven Davies then added some much-needed composure at the crease and all but wrapped up the win with a valuable 61 as Surrey claimed their first win in the championship this season.
Gloucestershire had been bowled out for 230 on day two of the contest but persistent rain meant Surrey were only able to knock 47 off their chase going into today.
Smith resumed on 39 alongside fellow opener Rory Burns, who had made seven, and the pair survived the early overs to make an encouraging start.
It was not long before Smith made it to 50 and the South African veteran continued to dominate the run-scoring while Burns served as a patient partner.
Gloucestershire's James Fuller and Matt Taylor continued to battle hard yet it was Smith's day, the 33-year-old sealing his century with a single through gully.
— Surrey Cricket (@surreycricket) May 14, 2014
Smith added just three more to his total, however, as Taylor drew a nick and Cameron Herring held on to give the visitors a breakthrough just before lunch.
Needing 122 more runs to win, Dominic Sibley joined Burns at the crease but the teenager was out for just four, caught by Alex Gidman off Taylor.
Gloucestershire had their tails up and, just four overs later, grabbed another as this time Burns was dismissed as he was caught by Benny Howell off Graeme McCarter.
Davies, who had dropped wicket-keeping duties to focus on his batting, made a positive start but Gloucestershire's hopes were growing, particularly when Gary Wilson was out lbw for 16 to leave the hosts 204 for four.
It was then, however, that Surrey took the game away from their opponents as Davies moved past his half-century alongside Jason Roy to make sure the target was within touching distance.
Roy eventually fell, stumped by Herring, and Davies was unable to finish unbeaten either as he was caught by Michael Klinger off Howell.
But, with just three more needed, Zafar Ansari finally hit the winning runs to seal an important Surrey victory.