England international wing Semesa Rokoduguni scored a try eight minutes into injury time as Bath claimed a dramatic Aviva Premiership victory over west country rivals Exeter at Sandy Park.
Rokoduguni produced a brilliant finish with the game's final move, brushing off attempted tackles from Gareth Steenson and Olly Woodburn to enhance his claims of Test selection against South Africa on November 12.
Fly-half George Ford converted and kicked two penalties, edging Bath home 13-10.
Exeter have now gone five games without a win in all competitions, and a losing bonus point was scant consolation after lock Mitch Lees' try nine minutes from the end looked to have been enough.
Steenson kicked a penalty and conversion, while Ford atoned for two first-half penalty misses as Bath prevailed to remain in the Premiership's top three behind Saracens and Wasps.
Exeter boss Rob Baxter made one enforced change from the side edged out by European Champions Cup opponents Ulster eight days ago, with Dave Dennis replacing injured flanker Julian Salvi, while a number of Bath switches included returns for half-backs Ford and Kahn Fotuali'i, and England second-row prospect Charlie Ewels featuring at number eight.
Both sides showed plenty of attacking intent during the opening quarter, but there were also a number of handling errors before Steenson kicked a 16th-minute penalty after his opposite number Ford missed an earlier chance from 30 metres out.
Bath began to exert some dominance up-front, with Henry Thomas giving Exeter prop Moray Low a tough time in the scrums, but another short-range penalty miss by Ford meant the Chiefs still led despite their opponents shading possession and territory.
Exeter then lost two players - hooker Jack Yeandle and full-back Lachlan Turner - to head injury assessments after they suffered knocks during the same passage of play. Elvis Taione and former Bath centre Ollie Devoto were their respective replacements.
Yeandle was soon back in the action, although not before his team produced a brilliant defensive rearguard to thwart Bath's try-scoring ambitions, with the visitors going through 18 phases of play, but lacking a finishing finesse.
Exeter then almost punished Bath's inability to score when centre Henry Slade intercepted a pass and sparked an impressive Chiefs counter-attack, only for Bath to quell the danger and then gain a penalty, which proved the final act of a one-score opening period.
Bath thought they had opened their account just two minutes into the second period following a long Jonathan Joseph kick that saw Fotuali'i link with lock Luke Charteris before Charteris' second-row partner Dave Attwood dived over the line.
But referee Ian Tempest disallowed the try following consultation with television match official David Grashoff after a Fotuali'i pass to Charteris was ruled forward, before Ford made it third time lucky and landed an equalising penalty.
The third quarter was largely plenty of huff and puff, but precious little composure inside each team's 22, and it was no surprise that it needed a penalty to get the scoreboard moving again, this time via a 45-metre strike from Ford.
Exeter's reply was impressive, though, and they pounced in ruthless fashion when Bath lost a lineout on their own throw, driving the visiting pack back 20 metres before Lees touched down under a pile of bodies.
Steenson added the simple conversion, and Exeter regained the initiative, four points clear with just nine minutes left.
Bath went for broke during the dying seconds, and it took a brilliant Slade tackle to bring down his fellow England squad member Joseph, before the visiting forwards applied relentless pressure and Rokoduguni struck deep into injury time.