Half-centuries from Graeme van Buuren and Ryan Higgins kept Gloucestershire hopes alive on the third day of the Bob Willis Trophy match against Warwickshire at the Bristol County Ground.
The home side looked in deep trouble when slipping to 30 for three in the morning session, having conceded a first innings deficit 37 when bowling out their opponents for 247 from an overnight 230 for eight.
But van Buuren (72) and Higgins (51) then shared a defiant fourth-wicket stand of 110 either side of lunch, which enabled Gloucestershire to reach 197 for six by the time bad light ended play eight overs early, a lead of 160.