Ben Stokes completed match figures of eight for 118 as Gloucestershire set Durham 340 to win the Specsavers County Championship match at Cheltenham.

The all-rounder pressed claims for an England Test place against India with another lively contribution, looking in good rhythm as he finished with three for 66 in the home side’s second innings of 252 all out.

Kieran Noema-Barnett hit an undefeated 69, while Ryan Higgins added 42 to his first innings century and Benny Howell made 43 against an attack again deprived of Mark Wood because of a sore heel.

Tom Latham had been last man out for 147 as Durham extended their first innings total from an overnight 219 for five to 275 all out, but could not prevent his team trailing by 87.

By the close the visitors had moved to 35 without loss in their second innings without undue alarm and required a further 305 for victory.

Latham began the day on 120 and again looked solid as wickets tumbled around him. Gloucestershire took the second new ball with the total 227 for five, and Stuart Poynter was soon bowled playing forward to Craig Miles for 32.

A key moment came, with Durham 252 for seven, when Wood, on 11, called Latham for a suicidal single to Matt Taylor at mid-off and was run out well short of his ground by a direct hit at the bowler’s end.

Matt Salisbury and George Harding fell to successive balls from Higgins and Latham’s vigil of six hours and 13 minutes finally came to an end in a bid to add quick runs before the final wicket went down.

Durham’s stand-in skipper had faced 281 balls, hitting 22 fours, in energy-sapping heat when he lofted a catch to deep mid-wicket.

Chris Rushworth then built on Latham’s efforts by striking two quick blows with the new ball at the start of Gloucestershire’s second innings, removing Miles Hammond and James Bracey cheaply as they reached lunch on 50 for two, leading by 137.

Howell and Chris Dent had steadied the ship and extended their stand to 70 after the interval before Howell was taken at second slip off Salisbury, having hit 7 fours.

From 85 for two, Gloucestershire slipped to 86 for five as Stokes had Gareth Roderick caught behind for a duck with an example of the extra lift he extracted from the Festival pitch and Dent, on 32, nicked Salisbury through to wicketkeeper Poynter.

Noema-Barnett walked out at number seven to face two bowlers with their tails up. But in his own unflappable style he doused the fire and found an in-form partner in Higgins as they turned the tide with a partnership of 84.

It took the introduction of Will Smith to break the stand. The off-spinner held onto a sharp return catch to send back Higgins with the score on 170 for six.

Noema-Barnett pulled Stokes for six on his way to an invaluable 96-ball half-century and useful contributions from Miles (14) and last man George Drissell (19) helped Gloucestershire set a challenging target.

Durham coach Jon Lewis was able to give a detailed update on Mark Wood's foot injury. He said: "Mark has been for a scan today and we will know more when we get the results. It's a strange one and it could be something and nothing.

"Mark goes 12 months without injury through being carefully managed, then bowls six overs in this game with no apparent problem, only to start feeling something towards the area of his heel. It is nothing to do with his past ankle problems and the symptoms are not that of a bruised heel.

"We are hopeful it will settle down quickly. Without him, our bowling attack have done us proud, but it would have been nice to have him available when Gloucestershire were 86 for five.

"Ben Stokes is super-human at times. Because we don't have him available that often, we can sometimes forget what a special talent he is."