Yorkshire fought grimly to avoid the possibility of the follow-on after Warwickshire had stretched out their first innings to 435 on the second day of the Championship match at Headingley.
The Champions closed on 128 for three, still 158 from their safety target of 286.
In a hard-fought encounter, Ian Westwood and Tim Bresnan were the stand-out players during Warwickshire’s marathon knock which lasted for 143.3 overs.
Westwood, 151 not out overnight, looked all set for a faultless double century until he fell lbw to off-spinner, James Middlebrook, for a career-best 196 from 377 balls with 25 firmly struck boundaries.
When Yorkshire batted, 20-year-old Will Rhodes was quickly out of the blocks with a couple of fiercely struck boundaries off Chris Wright and the innings had moved smoothly on to 35 when Lees was dropped by Keith Barker at deep mid-off as he drove uppishly at Jeetan Patel.
He did not benefit from the escape, however, because in Patel’s next over, the last before tea, Lees was forced back on to his stumps and pinned lbw by the spinner for 19.
India batsman, Cheteshwar Pujara, began on a positive note in his first home fixture for Yorkshire by opening his account with three powerful boundary shots, but Yorkshire lost two wickets on 88, the second of them in controversial circumstances.Rhodes tried to drive Patel over mid-on but failed to clear Boyd Ranking and was out for 46.
Ranking joined the attack and Pujara nicked his second delivery to wicketkeeper Peter McKay who dropped the ball but claimed to have scooped it up again before it hit the ground. McKay was sure the catch was clean and umpires Steven Garratt and Jeremy Lloyds consulted for a long while before giving Pujara out.
The pressure was at least temporarily eased by a partnership between Leaning and Gale which was worth 40 by the close.