The home side claimed three more precious promotion points courtesy of a Charlie Lee header, despite playing 83 minutes with a numerical disadvantage after the dismissal of key defender Gaby Zakuani.
Referee Clive Oliver pulled out his red card after the Congo international appeared to clip the heels of Cobblers forward Ikechi Anya.
Posh received a let-off when Danny Jackman curled the resulting free-kick against an upright with keeper Joe Lewis well beaten, before Aaron Mclean crushed a low drive against the woodwork at the other end moments later.
The decisive moment came after 33 minutes as Lee rose at the back post to head a pin-point Paul Coutts free-kick past Cobblers goalkeeper Chris Dunn.
Northampton suffered more woodwork misery seconds after the break when Andy Holt's header rebounded off the bar before Anya saw a last-gasp shot hacked off the line by substitute Chris Westwood.