Gale and Pyrah leave Nottinghamshire on the ropes
Stumps Nottinghamshire 143 (Hales 85, Pyrah 5-58, Sidebottom 4-30) and 175 for 6 v Yorkshire 336 (Gale 145*, Lyth 64)
A ferocious 145 not out from captain Andrew Gale put Yorkshire firmly in control of their County Championship Division One clash with title-holders Nottinghamshire at Headingley.
The visitors have been second-best on all fronts since winning the toss on the first morning, and had to fight hard to avoid a two-day defeat, eventually closing on 175 for 6 - with 18 runs required to make Yorkshire bat again.
Yorkshire began the second day on 213 for 5 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.
Richard Pyrah had his stumps hit by Luke Fletcher after one kept low but David Wainwright gave valuable support to Gale as Notts began to feel the handicap of being without Andre Adams, who did not take the field because of a groin strain.
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 9.
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. Every ball the number 11 kept out was loudly applauded by the home fans.
Consecutive boundaries for Gale advanced him to 101 off 169 balls, with 13 fours, at which stage Hannon-Dalby's contribution to the 34-run stand was a mere single. It was Gale's first century since flogging an unbeaten 158 against the same opponents at Trent Bridge towards the end of last season.
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 9 he had contributed 76 from the previous 80 runs. That exceeded the previous best for Yorkshire's last wicket against Nottinghamshire at Headingley, 73 between Wilfred Rhodes and Abe Waddington in 1920.
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 and in the next over Patel bagged a pair when he was bowled by Sidebottom.
At 38 for 3, a two-day finish looked on the cards but the visitors' resolve was stiffened by a 105-run stand between Alex Hales and Voges, during which the former completed his second half-century of the match by driving Rashid over long off for six.
The fourth-wicket pair looked assured against both pace and spin but once again Hales was to move into the 80s without reaching three figures. After making his way to 83 off 112 balls, with 12 fours and a six, he stood no chance of keeping out a shooter from Pyrah which hit the base of his off-stump.
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.