Leicestershire 111 (Higgins 4-26) and 117-6 (Cosgrove 42*) require a further 377 runs to beat Gloucestershire 202 and 402 for 4 dec (Dent 214*, Hammond 68)
Skipper Chris Dent hit an unbeaten 214 as Gloucestershire closed in on victory over Leicestershire on the third day of the Specsavers County Championship match at Bristol.
The 27-year-old left-hander reached his second Championship double hundred off 281 balls, with 24 fours and 2 sixes, helping his side to a second innings score of 402 for 4 before declaring and setting the visitors 494 to win.
James Bracey contributed 43 and Benny Howell 56 on another day dominated by Gloucestershire, who gave themselves 41 overs in which to clinch victory with a day to spare.
There followed another embarrassing Leicestershire batting collapse as they slumped to 52 for five before closing on 117 for 6, Mark Cosgrove unbeaten on 42.
The day began with Gloucestershire 152 for 1, leading by 243, and Dent unbeaten on 61. He and Bracey took the total to 219 before the resolute 21-year-old, who had top-scored with 76 in the first innings, edged a catch behind off Neil Dexter.
Dent moved imperiously to his first century as Gloucestershire captain off 198 balls with a six over long-on off Callum Parkinson's left-arm spin, a shot repeated in the same over by Benny Howell to get off the mark.
By then the home side were more than 300 in front. By lunch they had reached 261 for 2 an extended their advantage to 352.
The afternoon session proved equally tough for a Leicestershire attack unable to gain much movement through the air or off the pitch. Dent pulled Dieter Klein to the boundary to bring up his 150 and Howell reached a fluent half-century off 79 balls, with four fours and a six.
The pair made batting look easy. Dent, on 182, appeared to be caught behind, but the umpire was signalling a Klein no-ball and the run feast continued.
Klein suffered as a result, conceding 23 off an over, 20 of them to Dent as he moved effortlessly to 200. It was a surprise when the stand of 183 was broken, Howell falling lbw to the off-spin of Colin Ackerman.
With the declaration imminent, Jack Taylor marched out, but lasted only two balls before being caught at long-on to give Ackerman a second wicket. At that point Dent closed the innings, giving Leicestershire nine overs to face before tea.
Harry Dearden fell to a brilliant diving catch by wicketkeeper Gareth Roderick off Craig Miles and it was 12 for two when Ackerman tamely drove a delivery from David Payne straight to Ryan Higgins at extra cover.
The tea score was 24 for 2. Without a run added Paul Horton fell lbw to a Miles delivery that cut back. Dexter was taken at third slip aiming a loose drive at Higgins and at 42 for 4 Leicestershire were in disarray.
Higgins added to further to his four first innings victims when pinning Ned Eckersley lbw, but Cosgrove and Ben Raine spared Leicestershire the indignity of a three-day defeat by adding 60 before Raine, on 30, drove a catch to mid-off to give Miles figures of three for 36.