Northampton's Dan Biggar hit the post with a last-gasp conversion that would have earned a draw for Saints against Bath at the Recreation Ground.
Bath were cruising at 17-7 going into the last 10 minutes but the Wales fly-half landed a penalty and then sent left wing Tom Collins away for a try in the last minute. He just could not add the extra points and the game finished 17-15.
Home fly-half Freddie Burns was a relieved man because, after scoring or creating all his side's points, it was his deliberate knock-on that surrendered territory and possession in those closing moments.
The game was only seven minutes old when Bath lost Aled Brew to a painful-looking wrist injury, allowing former England Under-20 cap Max Wright a first team debut at outside centre.
Bath then shoved the Saints pack off a scrum but Burns pushed the penalty kick to the right from 40-plus metres.
As a heavy drizzle set in for the afternoon, both sides spent as much time spilling ball as winning it and even Biggar dropped a gentle pass from his scrum-half. Line-outs were just as much a game of pinball.
It was no surprise that the opening score was a typical wet-weather creation. Northampton were quicker to a hoisted kick and although Burns tried to intercept a pass, Cobus Reinach was able to hack on the loose ball and dive for the touchdown.
Biggar converted to give his side a 7-0 lead.
One of Northampton's most promising attacking positions was from a scrum on the Bath 22, but Reinach was far too deliberate with his pass inside to Andy Symons and Burns picked it off. There was no stopping the fly-half on his 80-metre dash upfield and he added the conversion too.
He could have sent Bath in with a lead at half-time but again pushed the kick wide.
A blustery wind added to the players' ball-handling problems after the break but Bath's scrum was in the ascendant, winning successive penalties and forcing Saints to remove former All Black Ben Franks for Ehran Painter.
As the possession stats began to swing in Bath's favour, Teimana Harrison was penalised for not rolling away at a ruck and Burns kicked a 55th-minute penalty.
An audacious chip by Burns, tapped back into his hands by two Saints players, created a second Bath try on 63 minutes. But it took a sweet pass by replacement lock Elliott Stooke to send Joe Cokanasiga sauntering in at the corner and Burns converted for a 10-point lead.
Saints mounted a huge effort on the home line after Biggar's high kick was collected by Harry Mallinder but Attwood rallied the Bath defence and the visitors had to be content with a 72nd-minute penalty by Biggar.
Collins' try made for a thrilling finale but Biggar hit the post with the conversion and Bath collected the points.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', '2df41bf5-0d87-41f3-b52e-7a3091b93e9f');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:uk');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:rugby-union');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Thriller at the Recreation Ground as Bath hold on for victory'});