Glamorgan 462 for 4 dec (Carlson 170*, Cooke 133*) drew with Northamptonshire 215 and 250 for 5 (Keogh 71*, Gouldstone 67*, Neser 3-52)
Glamorgan were frustrated by Northamptonshire's middle order as the two teams shared a LV= Insurance County Championship draw in Cardiff.
The home side declared on their overnight score of 462 for 4 for a first-innings lead of 247 runs and with Northamptonshire two men down, they were firm favourites for victory.
Such a win would have been remarkable given the length of time lost to rain over the first two days and a Glamorgan success looked even more likely when Michael Neser took three quick wickets.
But an unbeaten 71 from Rob Keogh - whose innings came in two parts after he retired on 50 to attend his late grandmother's funeral service online - steadied Northamptonshire's innings and Harry Gouldstone's 67 not out made the game safe.
Northamptonshire - who were already a man light after Gareth Berg suffered an ankle injury in the day two warm-up - were dealt a further cruel blow.
A club statement on Wednesday morning read: "Luke Procter will miss the final day of the ongoing County Championship fixture against Glamorgan.
"Procter left the squad on Tuesday evening following news of a family bereavement. The thoughts of everyone at Northamptonshire County Cricket Club are with Luke and his family."
It meant Glamorgan needed only eight wickets on the final day to win the match and they grabbed their first with just the second ball of the morning.
Northamptonshire captain Ricardo Vasconcelos was strangled down the leg side by Neser who had received his Glamorgan cap just minutes earlier.
Charlie Thurston edged Neser through the vacant third slip area, but Emilio Gay was the next to go in the same fashion as Vasconcelos. Thurston again had a reprieve when another edge - this time from Timm van der Gugten's delivery - went through the slip cordon once more.
Thurston's luck finally ran out when he edged a good Neser delivery to Chris Cooke for 29 and what was the Glamorgan wicketkeeper's third catch of the morning.
With Glamorgan's seam attack on top, it was perhaps a surprise to see captain Cooke turn to spin. Andrew Salter, Marnus Labuschagne and even Billy Root didn't look too dangerous as they all had a twirl. Northamptonshire's first session went from bad to worse when Saif Zaib was needlessly run out with the last action before lunch. Keogh hit Salter to Labuschagne at cover and the Australian's throw was too fast for Zaib and Cooke whipped off the bails.
Neser and Labuschagne settled into the attack after lunch but found Keogh and Gouldstone in obdurate mood. Keogh went to 50 from 112 balls but then immediately retired with family matters on his mind.
Bowler Simon Kerrigan arrived at the crease and Glamorgan sensed an opportunity, but he and Gouldstone put on a fifty partnership. Salter thought he had got Kerrigan caught at silly point by Labuschagne in the final session and although he was caught behind by Cooke off Michael Hogan for 36 when the second new ball came, Glamorgan couldn't do enough to force victory.
Northamptonshire finished on 250 for 5 with Keogh back at the crease and wearing a black armband.