Kane Williamson converted his maiden century for Yorkshire in his final home appearance into a superb 189 to give the home side the advantage over Sussex, who crumbled in response, on the third day of the LV= County Championship match at Scarborough.
Sussex closed on 98 for four, still trailing by 27, leaving Yorkshire well placed to take a maximum 24 points from the contest to tighten their grip at the top of the Division One table.
Having stretched out their first innings to 493, Yorkshire wasted little time in destroying the Sussex top order, starting with Luke Wells who was comprehensively bowled by Ryan Sidebottom without scoring.
Jack Brooks then saw Alex Lees fumble a catch at first slip from Chris Nash but it was not expensive because two balls later the opener could not avoid another testing delivery and this time Jonny Bairstow made no mistake behind the stumps.
Yorkshire were already scenting victory and moved a significant step closer in the next over when Ed Joyce was lbw pushing forward to Sidebottom to leave Sussex on 20 for three.
Batting remained a struggle against a keen attack and Tim Bresnan was the next to strike by having Craig Cachopa caught at second slip by Adam Lyth, but Luke Wright gamely went on the offensive and dashed to a fifty off only 53 balls with nine boundaries to remain unbeaten on 56 with Steffan Piolet on 10.
Williamson was sweating on 90 and Adil Rashid had yet to score when Yorkshire resumed on 258 for five on the third morning and it was Rashid who initially called the shots with some wristy strokes, driving Steve Magoffin's fifth ball through extra-cover and cutting consecutive deliveries from Matthew Hobden to the boundary.
Rashid had scored 28 to Williamson's six when he played round a ball from Lewis Hatchett and was bowled, but shortly afterwards Williamson pulled Magoffin through midwicket to complete his century off 187 balls with 12 fours. His only anxious moment had occurred the previous day on 16 when he was recalled after doubt over whether the ball had carried to James Tredwell at second slip.
Williamson's maiden century for Yorkshire came in his 20th championship innings since joining the county a year ago and he had preceded it with nine half-centuries, two of which had reached 97.
His careful application meant that he had been outscored by his partner in each stand so far and at first this again proved to be the case with the arrival of Bresnan, the pair setting up a record seventh-wicket stand in matches against Sussex.
The new ball was taken at 332 for six in 83 overs but to little effect and Yorkshire went in to lunch on 362 for six with Williamson 129 and Bresnan 32. On the resumption, the second of consecutive boundaries for Bresnan off Hatchett took the home side into the lead and the century stand arrived in 26 overs.
A fifth batting bonus point was secured at 400 for six in the 100th over and soon after Bresnan had notched his half-century from 102 balls with five fours he completed 4,000 runs in first-class cricket.
The stand sailed past the previous best for Yorkshire's seventh wicket against Sussex of 138 between David Denton and George Hirst at Headingley in 1905 and it was worth 157 in 41 overs when Bresnan gave Wells a gentle return catch to depart for 61 from 127 balls with six boundaries.
A short shower brought forward the tea interval, after which Steven Patterson was lbw to Wells and Williamson's eight-hour marathon ended on 189 from 320 deliveries with 22 fours. He, too, chipped back a catch to Wells and left the field to a standing ovation.
Brooks belted Wells for a midwicket six as he and Sidebottom stepped on the pedal and 27 came off four overs before Hatchett caught Brooks close in to bring Tredwell his second wicket of an innings in which Yorkshire had remorselessly turned the tables on their opponents.
Williamson said: "It was nice to get my maiden century and to contribute to a big first-innings total and it is always nice to make a big score when your team needs it.
"I am delighted with our position in the game and it was good to build a strong first innings to put Sussex under pressure and then to bowl like we did.
"The team needed someone to keep batting, not to be too reckless and to build partnerships and I was glad to be able to do that job."