Yorkshire suffered a dramatic reversal of fortunes on the third day against Warwickshire, as the table-toppers were reduced to 148-7 in their second innings with a lead of only 141, Chris Woakes having taken 4-31.
Yorkshire were in a relatively strong position at the start of play when Warwickshire were 221-8 and still trailing by 81 on the first innings.
By lunch, however, they had not only managed to scrape together a slender lead of seven runs but they also had Yorkshire struggling at 19-2 with both openers gone.
The ninth-wicket pair of Keith Barker and Jeetan Patel were initially responsible for undermining the advantage which Yorkshire had gradually built up over the first two days.
They had already put on 25 together when they resumed their stand and they went straight on the attack with a flurry of boundaries off Liam Plunkett and Steve Patterson.
Yorkshire were quickly forced to make bowling changes, Adil Rashid and Ryan Sidebottom being brought into the attack, but 28 runs still came off the first half-hour's play and further frustrations soon followed for the home side.
Patel, on 37, hit Rashid to deep square leg where Jack Brooks dropped a simple shin-high catch, and the batsman had another escape five runs later when he was put down at mid-wicket by skipper Andrew Gale.
Patel raised his half-century off 75 balls with nine boundaries and with one or two appeals being rejected Yorkshire appeared to be losing their cool as the partnership continued to develop.
It took a run out to bring an end to the 99 stand, Barker attempting a second run to backward point to bring up his own 50 but he was beaten by Brooks' throw to wicketkeeper, Andy Hodd. Barker's spirited innings came off 92 balls and contained four boundaries.
Warwickshire were 295-9 and Patel was still going strong, straight driving Sidebottom for four to bring up the 300 and smacking him over long-on for six to take his side into the lead, but further damage was avoided in the same over through Patel edging to Hodd for 63 from 84 deliveries with 10 fours and a six.
The ground seemed to have been swept from beneath Yorkshire's feet and they stumbled further as Woakes struck twice to round off an eventful morning. Alex Lees failed to use his feet and was caught low at third slip by Patel and Adam Lyth was lbw to a yorker.
Gale and Gary Ballance eased Yorkshire's plight by batting throughout an afternoon session shortened by a shower which brought forward the tea interval at 86-2.
Only nine were then added, however, before two wickets fell without addition in the space of seven balls from Boyd Rankin as Gale, on 34, looped a rising ball to Will Porterfield at gully and Rashid mis-hooked to Laurie Evans who was stationed round the corner.
Ballance again found himself in the role of trying to hold things together but he could only look on as the fifth wicket toppled at 104, Azeem Rafiq playing Patel off bat and pad to Ian Westwood at silly mid-on, and Ballance himself departed for 45 at 121, inside edging a yorker from Woakes' second ball of a new spell into his stumps.
Hodd attempted to block up one end while Plunkett went on the look-out for runs, cover-driving and hooking Woakes for four and six in one over before the bowler gained revenge by finding the edge, although Plunkett looked distinctly unhappy with the decision.
Sidebottom came in at 148-7 with but bad light brought the players off before he could face a ball.