James Grayson showed nerves of steel as he landed a dramatic late conversion to help Saints seal a vital 20-19 victory against top-four rivals Harlequins at the Stoop.
Chris Boyd's men looked to be heading for defeat when Quins roared back from 13-6 down at the break to lead 19-13.
But Alex Mitchell came off the bench to score in fine fashion with fewer than two minutes to go and Grayson kicked the conversion superbly under pressure to earn the victory.
It means Saints have now narrowed the gap to fourth-placed Quins to just four points with three Gallagher Premiership games to go.
But their triumph did come at a cost as George Furbank was stretchered off, and they also lost Piers Francis and first-half try scorer Ahsee Tuala to injury.
However, Saints now have a weekend off to recover before heading to Newcastle Falcons on April 26 for another key game in the race to reach the play-offs.
The black, green and gold had headed to the Stoop on the back of a costly defeat to Gloucester six days earlier, and they were behind early on against Harlequins.
Marcus Smith made amends after missing an early penalty as he secured three points for his side at the second attempt.
Saints used the kick-off to finally get some field position and after Francois van Wyk stole the ball, Matt Symons was penalised for playing the nine, giving Dan Biggar three points.
Quins were suddenly under a little pressure and after Reece Marshall won a penalty at the breakdown, Saints were at the hosts' door.
Rory Hutchinson made some tidy metres before producing a lovely offload and the ball was worked wide, where Jamie Gibson sent Tuala in with ease.
Biggar converted from the touchline to make it 10-3.
But Saints soon suffered an injury blow as full-back Furbank was forced off with what appeared to be a head injury that required lengthy treatment.
When play resumed, Smith slotted his second penalty of the game to cut the gap to four points, but Biggar soon cancelled that out.
Saints were totally dominant at the breakdown, winning penalty after penalty in that area as they tried to use it as a platform to really apply the pressure in the home half.
Teimana Harrison came within inches of the line before Saints were penalised for obstruction as the away side continued their profligacy in good positions.
Francis was forced to do some important defending just before the break as he made a key tap tackle on Quins wing Nathan Earle.
But it came at a cost for Earle, who was stretchered off with a suspected broken leg.
Saints headed in at half-time 13-6 up, feeling they should have been much further ahead given their level of dominance.
Quins came out with the bit between their teeth after the break, but after kicking to the corner twice, they were stopped by strong lineout defence from Saints.
Francis became the latest injury victim when he limped off to be replaced by Grayson, who went to full-back with Andrew Kellaway moving to centre.
And Quins soon made the most of the disruption, putting together a move that ended with Jack Clifford charging past Gibson to score.
Smith's simple conversion levelled the scores at 13-13 and the fly-half put his team three points ahead with a successful penalty 20 minutes from time.
But Saints would not go quietly, winning a string of penalties deep in Quins territory, but Chris Robshaw drew a huge roar from the home fans by earning a crucial turnover.
And after Quins won two penalties thanks to sizeable shoves from their pack, Smith sent another penalty between the posts to extend the lead to 19-13.
Saints then lost yet another player to injury as Tuala limped off, meaning Mitchell came on at scrum-half and Reinach switched to the wing.
But it was to work in Saints' favour as Mitchell showed his sharpness, picking the ball up on the right and finding space before selling a dummy and finishing in composed fashion.
Grayson was presented with a far from easy kick just in from the right touchline, but he was not fazed, bisecting the posts to put Saints ahead.
And after claiming the kick-off, the black, green and gold went through the phases before booting the ball out to put the seal on a fine away-day success.
Harlequins: Brown; Earle (Saili 39), Alofa Alofa, Tapuai, Murley (Lang 71); Smith, Hidalgo-Clyne; Auterac, Crumpton, Sinckler; Symons, Horwill (cc) (Glynn 40); Clifford (Kunatani 71), Robshaw (cc), Dombrandt.
Saints: Furbank (Kellaway 15); Tuala (Mitchell 74), Hutchinson, Francis (Grayson 44), Naiyaravoro; Biggar, Reinach; van Wyk (Waller 60), Marshall, Hill (Franks 51); Ratuniyarawa, Lawes; Gibson, Wood, Harrison.
Referee: Christophe Ridley