Two Emile Sinclair goals in six first-half minutes gave the Cobblers a priceless win in the battle of the bottom two at Torquay United.
The on-loan Crawley Town front man bagged twice to give Chris Wilder his first win in charge of Town, although Krystian Pearce reduced the margin of victory to 2-1 with a goal on the stroke of half-time.
While the result is not enough to lift Northampton off the foot of the table, it has closed the gap between them and Torquay to just three points and the gap to safety to five with third-from-bottom Wycombe Wanderers drawing 1-1 at home to Fleetwood.
The game was only 10 minutes old when Sinclair made his mark, bursting onto a through ball and beating home goalkeeper Michael Poke to it on the edge of the box.
He still had some work to do but kept his head and showed good composure to sidefoot firmly home and beyond the lunge of the covering defender.
The on-loan Crawley striker came alive in the box just minutes later to double the visitors’ advantage.
Alan Connell collected the ball in midfield and provided a deadweight pass down the inside-right channel for the striker to run onto.
Sinclair then outstripped Anthony O’Connor for pace before tucking a calmly-executed shot beneath Poke, who had stayed close to his line this time.
Torquay offered very little in attack, but substitute Jordan Chapell drew a good save from Duke five minutes before the break.
And they reduced the deficit when Pearce lost his marker at a corner and volleyed home at the front post.
It was a horrible time for Northampton to concede and made Chris Hargeaves’ half-time team talk a very different one.
His team came out with an added impetus and Leon McSweeney had to make a firm block to deny Chapell from 12 yards.
From the resulting corner, O’Connor headed down and against the foot of the far post as the home side began to build some sustained pressure.
Former Cobbler Karl Hawley came close with a diving front-post header after Chapell found space for a cross on the run down the right flank.
Duke almost allowed a regulation low take from Joss Labadie to slip through him in the closing stages of the game but dropped onto the loose ball as it threatened to squirm over the line.
But no further scares came and the Cobblers put the seal on a vital three points.
Torquay: Poke, Mansell, Pearce, O’Connor, Nicholson, Goodwin, Labadie, Lathrope, Bodin, Stockley, Benyon
Subs: Chapell (for Bodin 21), Hawley (for Benyon 60), O’Brien (for Goodwin 86)
Not used: Tonge, Downes, Rice, Cruise, O’Brien
Cobblers: Duke, McSweeney, Doumbe, Robertson, Widdowson, Hackett, Ravenhill, Carter, Dickenson, Connell, Sinclair
Subs: Marquis (for Sinclair 60), German (for Connell 77), Tozer (for Dickenson 81)
Not used: Morris, Snedker, Deegan, Toney
Cobblers fans: 69