Gloucestershire 504 for 9 dec (Dent 125, J Taylor 99, Smith 84, Howell 76) and 48 for 4 beat Leicestershire 252 (Dexter 56, M Taylor 3-39) and 299 (Azad 121, Higgins 5-71) by six wickets

Ryan Higgins claimed five wickets as Gloucestershire moved into the Division Two promotion race with a thrilling six-wicket Specsavers County Championship win over Leicestershire at Cheltenham.

Hassan Azad's battling last-day hundred helped the visitors extend their second-innings total from an overnight 78 for 2 to 299 all out, Higgins returning 5 for 71, but did not prove enough in an exciting finale.

The visitors collapsed from 255 for 4 at tea and Gloucestershire were left with eight overs to score the 48 needed for victory. They got home with three balls to spare, Gareth Roderick ending the game with an amazing six over point off Chris Wright. The home side took 22 points to move within ten of third-placed Northamptonshire with a game in hand, while Leicestershire had to be content with four.

Azad, who had hit 137 and 100 not out in the corresponding game at Grace Road this summer, began the day on 38, with occupation of the crease was his primary objective as his side chased the 174 more runs needed to make Gloucestershire bat again. He offered just one chance in the morning session, on 69 when Jack Taylor could not grasp a sharp catch at short-leg off the bowling of left-arm spinner Tom Smith.

Colin Ackerman helped frustrate the home attack on a fourth-day pitch offering little other than some variable bounce for the seamers, although there was some evidence of turn out of the rough. He and Azad maintained their third-wicket partnership until lunch, which was taken at 168 for 2, Azad having progressed to 82 after reaching a 134-ball fifty.

The second ball after lunch saw Ackerman edge Matt Taylor to wicketkeeper Roderick and depart for 41. Leicestershire still trailed by 83 and it looked an important breakthrough with a new ball not far away. It was taken at 205 for 3 and Higgins made good use, sending Harry Dearden's middle stump cartwheeling after he had made 19.

Azad remained unruffled, having combined excellent defensive technique with neat footwork against spinners Smith and Graeme van Buuren to reach his hundred off 256 balls.

By tea, he and Ben Mike had taken the total to 255 for 4, a lead of three runs. But the first ball after the break raised Gloucestershire hopes again as Azad edged Ethan Bamber to Miles Hammond at slip to end six hours and 22 minutes of intense concentration.

Mike was caught behind off Taylor, whose hostile post-tea spell brought him 1 for 6 from seven overs. Then, after Harry Swindells and Callum Parkinson had added 33 to take Leicestershire to the brink of safety, both fell in quick succession. Swindells was well caught by Benny Howell at first slip off Higgins and the following over saw Parkinson nick Chadd Sayers to Hammond at second slip. When Will Davis was lbw to Higgins for a duck, three wickets had fallen in 14 balls.

There were still more than 15 overs remaining and the Foxes led by only 41 at 293 for 9. Amid growing tension, Sayers ripped through Wright's defence to bowl him and end the innings with only six runs added.

Gloucestershire's frantic second innings saw Chris Dent bowled by Wright, who also had Miles Hammond caught on the boundary, while Abbas had Jack Taylor caught in the deep before a Higgins straight six off Abbas off the last ball of the penultimate over left nine runs needed.

Benny Howell was run out seeking a second run off the first ball of the final over. But Roderick marched out to hit a two before his extraordinary match-winning shot.