Schoolboy Dominic Sibley was the star of the show as Surrey reached 172-1 in response to Yorkshire's 434 all out on day of two at The Oval.
The hosts made a solid start thanks to a first wicket stand of 171 in 66 overs between Rory Burns and Sibley, who shared in Surrey's most productive opening partnership of the season in four-day cricket - the previous best being 70.
Sibley, 18, ended the day with an unbeaten 81 off 203 balls. But just before the close a superb catch by Jonny Bairstow off the bowling of Steven Patterson saw Burns depart for an equally resolute 82.
That was after Gary Ballance had hit 148 off 232 balls, including 20 fours and a six, as Yorkshire racked up their 10th championship total this summer in excess of 400.
Sibley, who has been granted leave from his A-levels at Whitgift School, was fortunate to survive a chance to second slip off the bowling of Ryan Sidebottom, when on eight.
But thereafter both batsmen played with increasing poise, underlined when Burns pulled Adil Rashid for six in the 25th over.
After tea, Sibley drove Rashid through extra cover off the back foot for two boundaries in an over before Burns cut Sidebottom for four to move to a 121-ball half-century.
Sibley brought up his maiden first-class half-century, which came off 163 balls, by lifting Kane Williamson over long-on for six.
The morning belonged to Yorkshire who, resuming on 316-6, added a further 118 to their overnight score.
Rashid contributed 43 to a seventh wicket stand of 72 in 19 overs with Ballance, who cut Matthew Dunn viciously for four in the second over of the day before replicating the stroke a couple of overs later.
After Rashid departed leg before to Tom Jewell, Ballance reached across to cut a wayward delivery from Jewell for four to bring up his fourth championship hundred of the season, which came off 194 balls and included 14 boundaries.
The 23-year-old Zimbabwean hit three consecutive fours square of the wicket off Jewell, which prompted the reintroduction to the attack of Dunn, who had Sidebottom caught low down in front of first slip by Steven Davies.
Just before lunch, Ballance lifted Zafar Ansari over deep midwicket for a maximum but perished attempting to repeat the dose, soon to be followed by Brooks - who was caught behind to give Ansari a championship best return of four for 70.