Glamorgan 207 (Salter 59, Meschede 49, Gleeson 5-60) and 63 for 1 trail Northants 310 (Levi 101, Hogan 4-58) by 40 runs
Richard Levi completed an important century on the second day in Cardiff to keep Northamptonshire on course for the win they need to maintain hopes of promotion in the Specsavers County Championship.
But Glamorgan fought back in the second half of the day, taking seven wickets for 69 then reducing their deficit to 40 for the loss of a single second-innings wicket.
Levi's 101 from 97 balls included 15 fours and a six and was his first in the Championship in a season in which he missed several weeks because of concussion. He received useful support from Rob Newton and Rob Keogh.
After 16 overs were lost to rain in the morning, Newton and Levi made rapid progress against a Glamorgan attack, Michael Hogan apart, that lacked direction and bowled far too many "four balls".
It was no surprise that Robert Croft, the Glamorgan head coach, had his bowlers out on the outfield practising for 10 minutes during the lunch interval, and they did improve as Hogan trapped Newton leg before for 67, made from 119 balls with eight fours.
The third wicket pair had added 104 in 21 overs, and with Levi ready to play an attacking role, the South African reached his century from only 95 deliveries. He was then out in the following over when he chased a wide ball from Lukas Carey and was comfortably caught by wicketkeeper Chris Cooke.
Keogh made 45 from 98 balls although he had one escape when he was athletically caught by Craig Meschede off Andrew Salter's off spin, but the umpire had called no ball for a delivery that was over waist high.
Levi and Keogh had put on 88 for the fourth wicket, but Northants then lost four wickets for 19 runs on either side of the tea interval. After Keogh was leg before to Marchant De Lange, Alex Wakeley, the Northants captain, who batted at No. 7 after aggravating a finger injury, was bowled by Hogan without scoring.
Rory Kleinveldt struck a breezy 23 before he was caught at cover, then Simon Kerrigan edged De Lange to Chris Cooke, and the innings ended when Richard Gleeson was bowled by Meschede. Hogan ended with four for 58 for Glamorgan, and de Lange three for 85.
Glamorgan had 15 overs to face at the end of the day, and soon lost Nick Selman who was bowled by Gleeson's ninth delivery - a sixth wicket in the match for the bowler. But Jacques Rudolph and Jack Murphy played out the remaining overs without any further alarms.