Bristol Bears fly-half Sam Bedlow scored a last-minute penalty to inflict a ninth consecutive Premiership defeat on Northampton Saints.
The visitors had victory snatched away from them after Ehren Painter was penalised for a deliberate knock-on.
Converted scores from David Ribbans and Piers Francis had put Saints 14-5 up at the break, with Henry Purdy replying.
Piers O'Conor's late try gave the Bears hope of a turnaround, and Bedlow provided a dramatic finale to the game.
The first half was an absorbing contest which featured quick rugby from both sides, with Bristol seeing a second try chalked off just before half-time for a knock-on by scrum-half Andy Uren four phases before Alapati Leiua crossed in the corner.
A Tiff Eden penalty at the start of the second period allowed the hosts to build momentum, with their scrum in the ascendancy,
But Eden was off target with two further attempts at goal and, after James Grayson stretched Northampton's lead to nine points from the kicking tee with 12 minutes left, it looked like Pat Lam's side would pay for missed opportunities.
But a clever kick from Harry Randall following a scrum allowed O'Conor to score under the posts, with Bedlow adding the extras to put Bristol two points behind with seven minutes remaining.
And, after Painter's infringement, Bedlow held his nerve from more than 40 metres to clinch back-to-back wins for Bristol.
The late twist means Northampton have equalled their worst run of consecutive Premiership defeats - set 16 years ago - and Saints have lost their past 10 matches in all competitions.
Bristol Bears director of rugby Pat Lam told BBC Radio Bristol:
"We found a way to win.
"We gifted them two soft tries, and the boys deserve a lot of credit for working their way back in to the game.
"We showed composure and control at the end, to be patient and put pressure on them and take the opportunity when it came.
"Fair play to Sam Bedlow, who stepped up and the win."
Northampton director of rugby Chris Boyd told BBC Radio Northampton:
"We needed to find a way in the last 20 minutes to close the game out and faltered in a couple of key areas.
"But I thought it was a much improved effort. I thought the defence was much more stout.
"No-one's happy with losing of course, but everyone's trying really hard and we've just got to be better."
Bristol Bears: Purdy; Adeolokun, O'Conor, S Piutau (capt), Leiua; Eden, Uren; Woolmore, Byrne, Lahiff, Attwood, Joyce, Heenan, D Thomas, Hughes.
Replacements: Capon, Y Thomas, Afoa, Holmes, Eadie, Randall, Bedlow, Fricker.
Northampton Saints: Tuala; Proctor, Francis, Hutchinson, Collins; Grayson, Taylor; Waller (co-capt), Marshall, Franks, Ratuniyarawa, Ribbans, Isiekwe, Ludlam (co-capt), Wood.
Replacements: Fish, Van Wyk, Painter, Uru, Adendorff, Mitchell, Dingwall, Naiyaravoro.
Referee: Luke Pearce (RFU).