Two goals from Scott McGleish helped the Cobblers secure their first league win in eight matches but they were left hanging on against ten-man Rovers.
It should have been plain-sailing for the home side after McGleish had taken his season's tally to five with a double strike in the fourth and 23rd minutes, and former Northampton man James Hunt had been sent off for the visitors two minutes later.
But this was always billed as an intruiging contest, with Rovers' management team of Ian Atkins and Kevan Broadhurst coming back to the club they once managed, and also bringing six former Northampton players with them.
And despite Hunt's dismissal and the fact that Jamie Forrester was removed early in a tactical reshuffle, it was former Cobbler Dave Savage who added late spice and set the home nerves jangling with an 81st minute header from Stuart Campbell's cross.
It should never have been so close. McGleish opened the scoring with a rising fourth minute drive from Ashley Westwood's cross and he then added his second with a stunning overhead kick after good work by Josh Low.
By the time Hunt was sent off, Northampton could have been over the horizon with Lee Williamson hitting the crossbar amid a flurry of other chances.
But Rovers' reorganisation made the whole affair much tighter and although McGleish spurned a glorious hat-trick chance five minutes after the break when he blazed a Luke Chambers cross over the bar, Rovers weren't out of it.
John Anderson sent a header wide from a Craig Hinton free-kick and Savage's late header kept the guessing game going to the end.
Rovers have now failed to win any of their last five league matches but can surely take heart from their disciplined performance after Hunt's dismissal while Northampton will look to build on this victory.