Nick Compton’s 149 and a stunning unbroken stand of 146 between tailenders Toby Roland-Jones and James Harris saw Middlesex rack up a huge lead and force a final day against Yorkshire.
Resuming just 81 ahead, with only five wickets in hand, their hopes of saving the game looked unlikely after the early loss of well-set skipper James Franklin (63).
But Middlesex took full advantage of benign conditions to bat through the day, their efforts split into two distinct halves.
Compton anchored the innings up to and just beyond lunch, quickly scoring the 14 he needed to record the 19th County Championship century of his career.
Franklin, though, had added just three to his overnight score of 60 when he fell lbw to Ryan Sidebottom, the lead at that point exactly 100.
Compton and John Simpson put on a further 87 either side of the interval but they were still not out of the woods when the centurion finally departed.
It was veteran spinner James Middlebrook who picked up Compton, pinning him lbw one run shy of 150, and seven short of the 156 he made against Yorkshire for Somerset last September.
The latter half of the day was spearheaded by wicket-keeper Simpson and the lower order.
He and James Harris added another 47 to the lead, a stand that was broken shortly before tea by part-time spinner Adam Lyth.
The England opener had Simpson lbw for 47, only the 16th wicket of Lyth’s eight-year first-class career.
That left Middlesex on 427-8, with a not impregnable lead of 234, and 39 overs still remaining in the day.
But a belligerent Toby Roland-Jones cut and drove his way to his maiden first-class century, off just 119 balls, hitting 18 fours and one six.
In a remarkable partnership, Harris also reached his half-century, albeit in a more measured manner, as both demonstrated some fluent strokeplay.
By the time stumps were drawn, Middlesex had recorded their highest-ever total against Yorkshire, surpassing the 527 they made at Huddersfield in 1877.
Not only that but they appear to have made the game safe – a remarkable effort given they were 0-3 after the first over of the match.
Follow West London Sport on Twitter
Find us on Facebook
This post was last modified on 11/09/2015