Teimana Harrison staked his claim for an England call-up as Northampton mounted a superb second-half comeback to edge out Bath 15-14 at Franklin's Gardens.
The away side looked set to claim their first win at the venue since 2000, as two opportunistic Jeff Williams tries put them 14-0 ahead at the break, but Saints fought back with man-of-the-match Harrison leading the charge.
The number eight scored his side's first try and, after Stephen Myler added a penalty, Mike Haywood popped up with just eight minutes remaining to register a vital five points.
Myler kept his nerve with the conversion that put his team ahead for the first time, and the final whistle saw Northampton move up to fifth in the Aviva Premiership standings - leapfrogging Sale Sharks and enhancing their chances of securing a place in next season's Champions Cup.
The Saints had been hit with an injury blow before kick-off as Ben Foden was ruled out.
And the man who came in for him, Harry Mallinder, was to endure a moment of bad fortune early on as his slip handed Williams the chance to touch down for Bath.
Rhys Priestland added the extras and Bath thought they had scored again soon after as Anthony Watson danced through the floundering home defence, but referee Wayne Barnes ruled Jonathan Joseph had passed forward in the build-up.
Northampton had ridden their luck, but they were to fall on the wrong side of fortune soon after as Williams scored again.
Luther Burrell lost the ball while his side were on the attack, and after Joseph kicked forward, Williams did likewise, pouncing on his own punt for his second try.
Priestland made it 14-0 at the end of a bizarre opening 20 minutes, and Northampton were left shell-shocked.
Try as they might the home side could not break through, until a minute before the break when George North put the ball down in the corner.
But Barnes attracted the ire of the home fans as he went to the TMO, Sean Davey, who opted to rule the try out for a forward pass from Mallinder to North.
Northampton had been unable to register a point in the first half and they were hampered by an injury to Kieran Brookes at the start of the second.
But Bath were soon down to 14 men as scrum-half Chris Cook was sin-binned for a deliberate knock-on, and Northampton were to respond through a Harrison try.
Myler missed the tricky touchline conversion in windy conditions, but he soon landed a penalty to cut the gap to six points.
Tom Wood looked to have got his team's second try but was held up at the last.
Nevertheless, Northampton kept coming and an unstoppable lineout drive saw Haywood grab the crucial try.
Myler then kept his cool by adding the extras to secure a vital victory that was greeted with a huge roar by the home crowd.