Gloucestershire 223 (Bracey 117, Sanderson 4-66) and 326 for 6 (Higgins 134*, Lace 73, Berg 3-52) lead Northamptonshire 288 (Keogh 113, Berg 66, Higgins 4-68) by 261 runs
A Ryan Higgins century revived Gloucestershire's hopes of claiming an opening-round win to mark their first return to Division One since 2005.
Higgins put his stamp on a see-sawing LV= Insurance County Championship contest against Northamptonshire with an unbeaten 134 after he had arrived at the crease with his side facing the prospect of defeat inside three days.
Northamptonshire, themselves aiming for a first top-flight win since 2004, had claimed three wickets inside the first hour to reduce the visitors to 21 for 4 and still 44 runs in arears.
All-rounder Higgins, without a Championship century in three years, then set about wiping off the deficit in a 77-run stand with Chris Dent (54) before adding a further 165 with Tom Lace (73). By the close on day three Gloucestershire's lead had grown to 261 with four wickets in hand.
It was a position Gloucestershire could only have dreamed of when veteran all-rounder Gareth Berg had seemingly swung the momentum of the match Northamptonshire's way with three wickets to supplement his heroics with the bat yesterday.
Berg helped the hosts to a 65-run lead after sharing a 137-run eighth-wicket stand with centurion Rob Keogh and immediately got to work with the ball this morning with the key wicket of James Bracey.
Bracey had himself revived Gloucestershire's first innings with a century but could only manage eight runs second time round before a leading edge flew to Ben Curran in the covers.
The 41-year-old Berg struck again when Graeme van Buuren was trapped lbw on the crease before Miles Hammond's loose drive at Ben Sanderson was snapped up by Curran at gully.
That prompted the arrival of Higgins with his team in deep trouble and desperate for their 27-year-old all-rounder to make good on his pre-season proclamation that he needed to add more runs to his consistent wicket taking if he was to push for higher honours.
Higgins struck four centuries in 2019, and none in the Championship since, but afforded more responsibility this summer he set about what appeared an uphill task alongside former skipper Dent.
Dent diligently reached his half-century and was perhaps unlucky to be removed by Berg just after lunch when he was adjudged lbw to a ball that he had looked to work to leg, briefly remaining at the crease after the umpire's finger was raised.
Higgins then doubled down on his work as he skipped along at a comfortable rate alongside Lace to avoid further loss in the session. Higgins pulled confidently to bring up their century stand in good time before Lace reached his half-century on the stroke of tea.
Higgins' century arrived after tea, and from 139 balls, when he whipped Emilio Gay to the midwicket rope and, after claiming four first-innings wickets, his first taste of Division One with Gloucestershire was firmly going to plan.
Northamptonshire finally managed to end the stand when Gay held a sharp return catch to dismiss Lace for 73. It was a timely breakthrough for Northamptonshire, just before the new ball was due, but again Higgins stood firm when it was required.
Higgins remained until the close, with Zafar Gohar alongside him in an unbroken 63-run stand, to set up an intriguing final day when Higgins' exploits with the ball will likely play a key role as both counties look to end their long waits for a top-flight win.