WARWICKSHIRE had the best of day two at Headingley, but Yorkshire remain ahead as they chase a crucial Specsavers County Championship Division One victory in the penultimate round of the season.

The already-relegated Bears have refused to lie down so far this week and caused Yorkshire plenty of problems today as they defended their first innings 219.

In the end, Yorkshire finished with 296, and a lead of 77, midway through the evening session, although Warwickshire closed on 49-1 from 16 overs to trail by 28.

Only Adam Lyth reached 50 in posting 62, but a quartet of valuable contributions secured two batting bonus points that could be pivotal come the final relegation reckoning next week.

Gary Ballance made 28, Jack Leaning 36, Tim Bresnan 47 and Matthew Fisher 37 to go with his five-wicket haul on day one.

Yes, Yorkshire could have done better, having started the day on 62-1, and there was the odd loose shot.

But credit must go to Warwickshire while there is help on offer for the bowlers as was proved in the latter stages of the day when the visitors rode their luck to finish only one wicket down.

Yorkshire's relegation rivals Somerset and Middlesex are in contrasting positions in London.

Somerset are up against it against Surrey at The Oval, while Middlesex are in a healthy position against Lancashire, defending a target of 221 on a bowler-friendly pitch north of the Thames at Lord's.

Seamers Chris Wright and Boyd Rankin claimed three wickets apiece for Warwickshire, while off-spinner Jeetan Patel added two.

The visitors struck three balls into the day when Ryan Sidebottom had Steve Patterson caught behind without addition to the score.

Alex Lees was bowled through the gate by Wright, courtesy of late inswing, before Lyth played on as he attempted to pull at Rankin in his first over of the day as the score fell to 115-4 in the 40th over.

Earlier, Lyth had reached his fifty off 102 balls.

Ballance and Andrew Hodd were both caught behind off Patel and Wright in the early stages of the afternoon as the score fell to 179-6 in the 61st over.

With a deficit of 40, there was an outside chance that Yorkshire would fall short of Warwickshire's score.

As it was, their lower order contributed significantly.

Bresnan shared in two useful partnerships to give Yorkshire batting points one and two and secure a lead.

He added 49 for the seventh wicket with Leaning and 36 with Fisher before falling three short of a fifty when he was bowled sweeping at Patel to leave the score at 264-8 in the 86th over.

Jack Brooks and Fisher both fell to Rankin after tea, caught at slip and caught and bowled, as the hosts missed out on a third batting point.

These were Fisher's first first-class runs in his third match.

Yorkshire's haul of five bonus points is more than Middlesex (four) and Somerset (four) have claimed in their respective matches, although the latter could match them with wickets tomorrow morning.

Ben Coad then had Liam Banks (22 not out) dropped low down at third slip by Leaning on nine before trapping Dom Sibley lbw as the score fell to 35-1 after 11 overs.

Four overs were lost to bad light.