Gary Ballance missed out on reaching 1,000 championship runs but steered Yorkshire into control of their match against Middlesex on the final day at Headingley.

Needing 95 from his final innings at Headingley this summer to reach the landmark, Ballance was dismissed for 90 after Yorkshire were bowled out for 194, leaving Middlesex needing 277 to win and they had reached 25-1 at lunch.

Ballance hit 11 fours during his 113-ball innings and was ninth out when he was caught at long leg off young seamer Tom Helm, but may have helped his hopes of being included in England’s Ashes squad to be announced on Monday.

Resuming on 130-5, Yorkshire lost their last five wickets for 64 runs in 20 overs, but Middlesex also suffered an early setback when Sam Robson edged Steve Patterson low to second slip, but survived the remaining five overs before lunch.