Jack Leaning and Andrew Hodd posted important half-centuries either side of tea as Yorkshire had the better of day two of their Specsavers County Championship clash with Middlesex at Headingley.

After day one was washed out, this was the first day’s play of a fixture between the teams who have shared the Division One title for the last three years.

But, with four matches to play including this, they find themselves looking over their shoulders at the relegation zone.

Yorkshire closed on 317-7 from 98 overs, recovering from 116-4 as Leaning posted 85 from 142 balls and wicketkeeper Hodd 51 from 90, sharing 114 for the fifth wicket inside 30 overs. Bad light meant six overs at the end of the day meant were lost.

Middlesex captain James Franklin opted for an uncontested toss before Steven Finn claimed the only wicket of the opening session when he had Australian Shaun Marsh lbw playing around one for 22, leaving the score at 39-1 in the 19th over.

Adam Lyth impressed for 40, battling hard before expanding in a similar way to Leaning and Hodd did later in the day.

James Harris bowled six maidens on the trot to start his spell having replaced Finn from the Kirkstall Lane End before he got Lyth caught behind with a beauty shortly after lunch.

That was the first of three wickets to fall in the first 11 overs of the afternoon as the score fell to 116-4 in the 44th.

Yorkshire captain Gary Ballance marked his first bat for the county since the reverse fixture at Lord’s in late June (due to England commitments and a fractured finger) by edging behind for 12 as he played expansively outside off.

Alex Lees (27) was then trapped lbw by Franklin’s left-arm seamers and Yorkshire were in danger of undoing their early good work against a tidy visiting attack, who could have created more pressure with tighter lines.

But Leaning and Hodd eased those concerns during their fifth-wicket alliance, which started cautiously before expanding on a pitch with plenty of pace and carry.

Leaning drove nicely on the way to his second successive Championship fifty - his third in all this season - off 58 balls.

Hodd whipped Harris straight of mid-on for four to mark the shot of the day on the way to his third of the campaign.

A first batting bonus point had been secured in the final over of the afternoon before their century stand was recorded just after tea.

Hodd reached 50 off 87 balls before edging Franklin behind as the score fell to 230-5 in the 74th over and a second batting point for 250 came on the cusp of the second new ball.

Tim Murtagh lifted Middlesex spirits by bowling Leaning as he played to leg and trapped Adil Rashid lbw with successive deliveries at the end of the 85th over, leaving the score at 270-7.

But the visitors could not prevent Yorkshire from reaching 300 for the first time in nine completed Championship innings.

Tim Bresnan and Liam Plunkett shared an unbroken 47 for the eighth wicket, reaching 26 and 34 not out.