Essex 368 (Thain 50*, White 3-68) and 33 for 3 trail Yorkshire 459 (Revis 150, Coad 89, Lyth 84) by 58 runs
Centurion Matthew Revis and Ben Coad combined to a post a record-breaking ninth-wicket partnership of 169 and fashion a Yorkshire day-three turnaround to give themselves hope of a Rothesay County Championship victory against fellow strugglers Essex at York.
Second-bottom Yorkshire and Essex, one place above them in the Division One table, were separated by 14 points ahead of a ninth-round fixture which had advanced to the White Rose county starting this day's play on 143 for 3 in reply to a first-innings 368.
Shane Snater's seam helped reduce the hosts to 273 for 8 after lunch, claiming three more wickets to add to a solitary strike on day two. Yorkshire were 95 behind at that stage. However, things changed dramatically as allrounder Revis and new-ball seamer Coad scored runs at will against an increasingly ragged Essex attack. Both men posted career best scores, Revis with 150 off 187 balls and Coad 89 off 110 in a total of 459 all out.
Essex started their second innings with 16 overs remaining in the day, trailing by 91, and closed on 33 for 3. Coad struck twice with the new ball.
Revis and Coad united for the best part of 33 overs to amass the highest ever ninth-wicket partnership for any county against Essex in a first-class match.
Essex struck three times during a morning which had started with Adam Lyth and captain Jonny Bairstow at the crease.
Bairstow was involved in an engaging battle with Indian overseas left-arm seamer Khaleel Ahmed on a pitch which remains placid. The former cut two boundaries before falling caught behind for 29 when trying to uppercut another, leaving the hosts 169 for 4 after 61 overs - the seventh of the day.
Lyth batted with a calf injury picked up during the latter stages of day two and edged behind a checked drive against Snater on 84, passing 14,000 career runs in the Championship in the process.
That was the first of two wickets for the Dutch international in as many overs with the new ball as Yorkshire fell to 228 for 6 in the 84th over, with George Hill trapped lbw on the back pad pushing forwards.
After lunch, Simon Harmer's offspin ousted Will Sutherland lbw before Dom Bess was caught behind down the leg-side, handing Snater a fourth wicket and leaving Yorkshire eight down, 95 behind and in some trouble.
Sandwiched in between the seventh and eighth wickets, Revis reached his fifty off 89 balls - his second in as many innings after 93 not out against Nottinghamshire at Trent Bridge last week.
What came next, few would have predicted. Revis and Coad pinched a second batting point and denied Essex a third bowling point.
Revis played confidently through the off side off front foot and back against seam and spin, later heaving two huge leg-side sixes off Noah Thain's seam. Coad hoisted two sixes off spin over long-on and straight in reaching his fifty off 69 balls.
Yorkshire had secured a lead of two by the time they reached tea at 370 for 8, with Revis unbeaten on 94 and Coad celebrating his second career fifty - and his second against Essex after 69 at Headingley in a 2022 defeat.
Revis reached his ton, off 151 balls, inside the opening 10 minutes of the evening and later his maiden 150 off 185 as Essex struggled to finish off the tail - something they have grappled with all summer.
Coad was understandably frustrated when bowled by Matt Critchley's legspin, 11 runs short of what would have been a maiden century. And Revis then holed out to long-on against the same bowler.
That left Yorkshire with an hour's bowling against an Essex top order now under unexpected pressure.
That pressure only mounted as Coad continued to influence proceedings. He removed Paul Walter and Tom Westley for ducks as Essex's second innings slipped to 6 for 2, the former trapped lbw and the latter another batter to be caught behind down leg.
And when Hill bowled Dean Elgar with a beauty late in the day, Essex were 28 for 3.