Skipper Andrew Gale scored a season's best 126 not out as Yorkshire batted all day to set up a commanding lead over Middlesex in the LV= County Championship match at Scarborough.
They closed the third day on 400 for five with an advantage of 421 and if they go on to bowl out their opponents they will return to the top of Division One.
Cloudless skies were in place for the start of the day and with Yorkshire resuming on 29 for one they made rapid progress through Kane Williamson and Alex Lees, who batted throughout the morning session while adding 117 in 31 overs.
Steven Finn twice struck Williamson around the body with sharply rising deliveries early on but Lees was in prime form from the word go and after driving Finn sweetly through the covers for four he whipped him to the square-leg boundary later in the over.
The elegant opener drove off-spinner Ollie Rayner over long-on for six and took a single off the next ball to take the stand into three figures. His half-century arrived off 111 balls with seven fours and a six and Williamson got there in the next over from Tom Helm from 83 deliveries with eight boundaries.
Lees was 66 and Williamson 62 when lunch arrived at 146 for one but both fell quickly in the afternoon, Williamson cutting the second ball from Tim Murtagh to be well held one-handed above his head by Rayner in the slips. Murtagh also had Lees caught in the cordon, this time low down by Dawid Malan for 67.
Suddenly, Yorkshire had slipped to 155 for three with a lead of 176 and some of the early momentum was lost as Gale and Jonny Bairstow tried to settle in.
But at 201, Bairstow, on 32, hooked Toby Roland-Jones and the ball sailed into the hands of Helm in front of the pavilion enclosure at long-leg.
A solid partnership then developed between Gale and Jack Leaning but it was not entirely without blemish and Gale had an escape on 40 when he cut at Finn and Chris Rogers dropped a one-handed chance to his left at point.
Yorkshire were 247 for four at tea and Middlesex opted for the new ball shortly afterwards. A short delivery from Finn struck Gale on the left thumb and he had to receive attention before resuming. He went to his fifty off 99 balls with three fours and the scoring began to accelerate for a while as Leaning contributed his own share of good-looking shots.
Gale was in the wars again when he deflected a Finn delivery on to his left elbow on 97, but he was soon acknowledging his hundred which came off 162 balls and contained 10 fours. His ton followed hard on the heels of Leaning's half-century, from 130 deliveries with three boundaries.
The runs began to come thick and fast, Leaning straight-driving Finn for six and dishing out similar treatment to Rayner and Malan, but Gale gave little indication of wanting to declare before the close and the lead went beyond 400.
In attempting another big hit off Malan, Leaning was stumped for 76 to end a fifth-wicket partnership of 182 with his captain, who closed on 126 from 180 balls with 13 fours.
Afterwards Gale said he is yet to make a decision about batting on.
"There was less sideways movement in the pitch today and you never felt you were in if you got outside your bubble. I am not sure yet about batting on - I will have a chat with coach Jason Gillespie about it tomorrow," he said.
"It was a good day for us, which was set up nicely by Alex Lees and Kane Williamson in the morning. It was tough after tea with the new ball due and if we had lost three wickets then we could have been fighting to get back into the game. Jack and I managed to accelerate later on and set things up nicely.
"It was good to get away with my shot to point which Chris Rogers put down. To be caught twice at point in the same match, you would need shooting!"