Jim Allenby hit his first century of the season as Glamorgan batted throughout the final day against Essex at Colchester to secure a draw.
Resuming on 16-0 in their second innings still 66 runs behind, Glamorgan quickly slumped to 63-4, including three wickets for Essex spinner Harbhajan Singh (3-62).
But Allenby and Ben Wright forged a 180-run stand for the fifth wicket to take the Welsh county to safety.
Wright fell for 83 to left-arm seamer Charl Willoughby (2-66), who also removed Graeme Wagg in his next over, but Allenby remained unbeaten on 103 when a draw was agreed. The Australian-born all-rounder faced 163 deliveries and hit 11 fours and two sixes.
Essex's Tom Westley hit a career-best 185 to give the home side a glimmer of hope against Division Two rivals Glamorgan at Colchester.
The opener hit 28 boundaries in his 334-ball knock to help Essex amass 520 in their first innings, giving them a lead of 82 over their opponents.
Owais Shah also reached three figures, the former England batsman hitting 17 fours and four sixes in his 138 as he combined with Westley to put together a partnership of 191 in 56 overs.
Essex had already seen their openers put on 178, though Jaik Mickleburgh (74) added only two runs to his overnight score before he was caught behind by Mark Wallace off Huw Waters.
The hosts managed to claim the full five batting bonus points on offer with a ball to spare as they managed their highest score of the summer.
Veteran off-spinner Robert Croft finished with figures of 5-135 in 30.5 overs for Glamorgan, who steered clear of trouble late in the day to reach the close on 16 without loss.
Essex made a strong start in reply to Glamorgan's first-innings total of 438, closing day two at Colchester on 165 without loss.
Tom Westley ended up 10 short of a fifth first-class century, the right-hander's lively knock featuring 17 boundaries, while partner Jaik Mickleburgh cleared the ropes once on his way to an unbeaten 72.
Glamorgan had resumed in the morning on 242-3, and it was more than 20 overs before they lost a first wicket as overnight centurion Stewart Walters struck up a decent stand with Ben Wright.
The pair had put on 70 by the time Wright became the first of four wickets for Harbhajan Singh, who then also removed Walters for 159.
If Essex sensed a quick conclusion to the innings they had reckoned without Graham Wagg, who struck five fours and two sixes in a crowd-pleasing 54 before becoming the last wicket to fall.
The hosts did at least see Mickelburgh and Westley prosper with the bat - the duo shared in a double century stand against Leicestershire at Chelmsford recently that saw both players reach three figures.
Stewart Walters made a fine unbeaten century as Glamorgan took control on the opening day of their County Championship clash with Essex at Colchester.
The-29 year-old Australian finished on 129 not out having rarely played a false stroke as the visitors reached 242-3 by the close of play.
After the visitors had won the toss, Maurice Chambers did gain an early breakthrough when he had Nick James (14) snapped up at forward short leg by Jaik Mickleburgh, but Essex had to wait until well after lunch for their next success.
Walters and Will Bragg were responsible for that long wait, Bragg reaching his half-century first, before Walters brought his up off 72 balls by straight driving Charl Willoughby to the fence in the next over.
The pair had put together a stand of 107 in 28 overs to carry the total to 133 before Essex managed to separate them - Graham Napier getting one through the defences of Bragg who departed for 54.
Walters, however, continued on his impressive way and moved into three figures with his 15th boundary, a leg side shot off Ryan ten Doeschate.
He shared another century stand with Marcus North (24) in which he did the bulk of the scoring, but lost his partner after the Australian all-rounder gave Napier his second wicket by slicing to Harbhajan Singh in the gully.
Soon afterwards, rain arrived to save the Essex bowlers from further punishment leaving Walters to resume in the morning along with Ben Wright.