Unbeaten centuries from Alex Gidman and Will Tavare guided Gloucestershire to a draw with Essex at Bristol.
The duo combined in an unbroken 233-run stand to usher the hosts to safety after they had been uncomfortably placed at 18 for two.
Essex had declared on their overnight 305 for eight, leaving Ben Foakes on a career-best unbeaten 132.
That left Gloucestershire, who made just 134 in their first innings, 171 adrift and facing a testing day in order to secure a draw.
And it looked like defeat could well be on the cards when both openers went early but Gidman and Tavare guided them to 251 for two and a draw was agreed upon.
Gloucestershire lost their first wicket in the third over when Chris Dent, who was last man out in the first innings, edged behind to give David Masters his seventh wicket of the match.
Captain Michael Klinger then fell for seven, bowled by Tymal Mills to leave the hosts wobbling at 18 for two.
But there was nothing Essex could do to part Tavare and Gidman, who batted together for more than 70 overs.
It was the second 200-plus partnership of the match, with Foakes and James Foster putting Essex in control with their 218-run combination yesterday.
— David Payne (@sidpayne7) April 30, 2014
For 24-year-old Tavare, who was on exactly 100 when a draw was declared, it was a second century in three matches this season.
Gidman scored at a faster rate to reach 119, his 21st first-class century.
Essex collected 11 points from the match with Gloucestershire picking up seven.
Both sides have drawn two of their three matches so far this season, with Essex beating Derbyshire in their opener and Gloucestershire losing to Hampshire.