Yorkshire 255 and 185 for 6 (Wharton 67, Bairstow 64*) trail Surrey 512
(Foakes 86, Patterson 85) by 72 runs
Jonny Bairstow made a belligerent 64 not out and James Wharton an excellent 67 but Yorkshire are still facing defeat against Surrey at the Kia Oval.
Surrey took three wickets late on day three to underline their complete dominance in a Rothesay County Championship match they will expect to bring them a second win of the Division One season.
The champions were held up by Bairstow and Wharton's fourth wicket stand of 84 but then Matt Fisher bowled Wharton and Tom Lawes removed George Hill and nightwatchman Jordan Buckingham in successive balls to leave Yorkshire 185 for six at stumps - still 72 runs adrift.
Lawes had Hill caught at first slip and then pinned Buckingham leg-before, leaving Matt Revis to keep Bairstow - who has hit two sixes and eight fours in his 66-ball effort so far - company until the close.
Nathan Smith and Jordan Clark had earlier Yorkshire up against it in their second innings at 31 for two, although Wharton and Jonny Tattersall then dug in either side of tea and put on 52 for the third wicket.
Finlay Bean was the first Yorkshire wicket to fall, for seven, thin-edging a Smith outswinger through to tumbling wicketkeeper Ben Foakes, and five overs later Adam Lyth was also gone, for 16.
Lyth, who had looked fortunate to survive an impassioned leg-before appeal from Smith to the second ball of the innings, had made it only to 16 when Clark's seventh ball bounced steeply at him and he edged to third slip.
Clark's first spell was an impressive 6-5-4-1 and, on his return to the attack after tea, the big all-rounder had Tattersall caught at second slip for 12.
Bairstow, however, was soon into his stride and Surrey were forced on to the defensive as he and Wharton added 84 inside 17 overs.
The 24-year-old Wharton impressed with some classical strokeplay but it was Bairstow who predictably led the counter-punching as he pulled Fisher over the short long leg boundary for successive sixes on his way to a 39-ball half-century.
Fisher, though, hit back by producing a magnificent inswinger to bowl Wharton between bat and pad after he had faced 135 balls and hit six fours.
Surrey were already 129 runs ahead at the start of day three when they resumed on 384 for seven, and any hopes Yorkshire might have had of quickly bringing the innings to its conclusion were quashed as Clark and Smith settled in comfortably despite overcast conditions.
New Zealand all-rounder Smith looked a quality player to be coming in at No 9, on-driving Jack White early on for a sumptuous boundary - although he did also nick the same bowler down into the ground and clean between keeper and first slip for another four to bring up Surrey's 400.
Smith's 70-ball 42 was ended when Hill, Yorkshire's stand-out bowler throughout, angled his medium-pace through a defensive push and deservedly won an lbw shout to complete an excellent five-wicket haul. Hill only bowled one more over after that, finishing with five for 66, but Smith and Clark's eighth wicket partnership of 94 in 25 overs had taken Surrey's lead close to 200.
They were soon well beyond that, too, Lawes arriving at No 10 to showcase his own all-rounder status with a series of classy strokes against a tiring attack. The 22-year old was off the mark with a lovely lofted straight four off Revis and he also twice pulled the same bowler for further boundaries.
Clark, on 41 overnight, had completed 2,000 first-class runs for Surrey before, on 69, playing on against Jordan Thompson after a determined near three-hour knock in which he had faced 147 balls and struck only five fours.
Surrey's final wicket then added 48 more, with Lawes scoring freely in an unbeaten 37 from 33 balls and last man Fisher also contributing some nice shots in 18 before flashing Thompson high to first slip.