A ferocious 145 not out from captain Andrew Gale put Yorkshire firmly in control of their LV County Championship Division One clash with title-holders Nottinghamshire at Headingley.
The visitors have been second best on all fronts since winning the toss yesterday and had to fight hard to avoid a two-day defeat, eventually closing on 175 for six - with 18 runs required to make Yorkshire bat again.
Yorkshire began the second day on 213 for five with a lead of 70 but things did not go entirely to plan early on. Gale completed a watchful half-century off 91 balls but Adil Rashid added only a single to his overnight 39 before he played round a ball from Samit Patel and was bowled.
Just as he was beginning to settle in, Wainwright drove a gentle return catch to Patel and in the following over Ryan Sidebottom was lbw to Paul Franks without scoring, leaving Yorkshire on 254 for nine.
It looked as if Gale, on 67, would be denied his century, but he managed to plunder the bowling while last man Oliver Hannon-Dalby offered solid support.
Gale moved into hurricane mode as he planted consecutive balls from Fletcher high over mid-wicket for six and when lunch came at 334 for nine he had contributed 76 from the previous 80 runs.
Only two were added after the interval, however, before Hannon-Dalby was caught at second slip by Adam Voges of Charlie Shreck, Gale receiving a standing ovation for his unbeaten 145 from 205 balls with 15 fours and two sixes.
It did not take long for Nottinghamshire’s top order to hit trouble again, Franks’ middle stump being struck so hard by Sidebottom that it had to be changed. Mark Wagh’s off-stump was flattened by Pyrah’s 10th delivery.
At 38 for three, a two-day finish looked on the cards but the visitors’ resolve was stiffened by a 105-run stand between Alex Hales and Voges.
Pyrah was once more fulfilling a vital role with the ball and he went on to remove Voges for 42 before being rested with figures of 15-8-19-3, Sidebottom returning to deepen Nottinghamshire’s gloom by getting Alistair Brown caught behind.