Yorkshire 417 for 9 (Ballance 189, Brooks 82) lead Worcestershire 340 (Brooks 6-94) by 77 runs
Gary Ballance has played a significant role in ensuring Yorkshire's Division One survival in the Specsavers County Championship and a superb century rescued his side and then tipped proceedings firmly in their favour against Worcestershire.
The one-time England batsman followed up his hundred in the draw against Nottinghamshire and 85 in the victory over Lancashire by holding together the Tykes innings after Worcestershire had been bowled out for 340 at Blackfinch New Road.
Ballance fought a virtual lone hand while completing his third ton of the campaign - and steering Yorkshire past the threat of being asked to follow on - until he was joined by Jack Brooks in a run-laced final session. The pair added a record-breaking 171 in 27 overs for the ninth wicket and shepherded the visitors into a lead that had seemed unlikely when they joined forces at 232 for 8.
It surpassed Yorkshire's previous ninth wicket best against Worcestershire of 150 by Azeem Rafiq and Matthew Hoggard at New Road in 2009.
Brooks is certainly signing off in style before joining Somerset on a three-year contract as he followed up his six-wicket haul in Worcestershire's first innings with 82 before he was dismissed in the penultimate over.
It left Ballance unbeaten on a chanceless 189 from 213 deliveries with two sixes and 29 fours as Yorkshire closed on 417 for 9 - a lead of 77. But, as well as Ballance and Brooks played, Worcestershire were left to reflect on another situation in a season of promise that slipped from their grasp when well placed - a major factor in their relegation to Division Two.
They seemed powerless to stop the onslaught and were also handicapped by the absence after tea of paceman Josh Tongue with a foot injury as Ballance and Brooks cut loose almost at will.
Worcestershire resumed on 319 for 8 and Ben Coad struck with the fourth delivery of the day without addition to the score as he trapped Ben Twohig leg before. Brooks then added to his five-wicket haul by wrapping up the innings as Dillon Pennington was caught behind to leave Tongue unbeaten on 30.
When Yorkshire began their reply, Adam Lyth made a quickfire 27 before he fell lbw to Wayne Parnell and Jack Leaning was undone by a fine delivery from Tongue and was comprehensively bowled. Hey Spinner Ben Twohig struck with the final delivery before before lunch as Jeet Raval went to cut and dragged the ball onto his stumps.
Former Worcestershire batsman Tom Kohler-Cadmore went leg before to Twohig and Jonathan Tattersall had his off stump knocked out by a Tongue delivery which kept low. Pennington, who had impressed in Worcestershire's win at Scarborough, had Tim Bresnan pouched at second slip
Tongue's third success was also clean bowled in the form of Tykes skipper Steven Patterson and, shortly after tea, debutant James Logan was lbw to Moeen Ali. But then the balance of power shifted dramatically as Ballance and Brooks raced along at more than six an over.
The carnage only ended when Brooks, having struck 15 fours in his 99-ball knock, edged Moeen - by now bowling medium pace - through to keeper Ben Cox. A total of 203 runs came from 32 overs after tea.