Worcestershire registered their highest ever total at the Kia Oval but then found Surrey wickets hard to come by before Saeed Ajmal struck a crucial late blow on day two of the LV = County Championship clash.
The visitors were dismissed for 476 after lunch on the second day as they eclipsed their previous best total on the ground of 406-9 in 1938.
But on a wicket offering little assistance to seamers or spinners, Surrey overcame the early loss of Arun Harinath to reach 134-2 off 52.5 overs thanks to a century stand between Zafar Ansari and Rory Burns.
That partnership was only broken with what was the final ball of the day as Burns, having made 79 off 171 balls with nine fours and a six, drove at Ajmal and perished to a sharp slip catch by skipper Daryl Mitchell.
Worcestershire resumed on 329-4 off 96 overs clearly intent on posting a sizeable total rather than making a frenetic bid to collect a fifth batting point.
Moeen Ali and Ross Whiteley extended their fifth wicket partnership to 62 in 25 overs against a Surrey attack lacking Jade Dernbach who was stuck in traffic after a serious accident had led to several road closures.
Moeen's fine innings was eventually ended on 162 when he edged a delivery from Matt Dunn and keeper and skipper Gary Wilson took a fine one-handed catch in front of first slip.
His knock spanned 277 balls and contained five sixes and 13 fours.
Whiteley drilled spinner Gareth Batty over long on for six to bring up the 400 in the 117th over.
But after making 43 he nicked Tim Tremlett through to Rory Burns at first slip to give the England paceman his third wicket of the innings.
Joe Leach (3) tried to cut Batty and was caught behind but Ben Cox was soon into his stride and was unbeaten on 37 out of 439-7 at lunch.
Dernbach finally arrived at the ground in time to join the attack after the interval and his first over of the day accounted for Jack Shantry (8) with keeper Wilson again excelling in taking the catch
Cox went on the offensive and brought up his 50 off 68 balls with five fours and a six.
He was eventually caught at deep backward square leg by Batty off Dernbach for 64 and the innings ended when Saeed Ajmal (6) top-edged Batty.
Worcestershire made an early breakthrough when Surrey started their reply, needing 327 to avoid the possibility of being asked to follow on.
Arun Harinath had already had a stroke of good fortune when he edged Charlie Morris through the slips for four.
But he perished in Jack Shantry's second over on five when the ball looped up off the top edge to Tom Fell at leg slip.
Ansari and Burns saw Surrey through to tea without any further setbacks at 44-1 off 21 overs.
The left-handed pair were largely untroubled in the batsman-friendly conditions although Morris did induce a couple of edges which flew to the third man boundary.
Burns, the more aggressive of the batsmen, reached his 50 off 104 balls with one six and six fours.
The Worcestershire attack maintained the disciplined line which has been their trademark this season but the 100 came up in the 40th over and the century stand between Burns and Ansari arrived in 38 overs.
But after the pair had added 127, Ajmal was rewarded with the dismissal of Burns to leave Ansari unbeaten on 39.