Richie Gray's added-time try sent Glasgow Warriors on their way to victory over Bath and to the top of Heineken Cup Pool 3.
Duncan Weir kicked three penalties to Tom Heathcote's two as the Warriors led 9-6 at the break.
Four more Heathcote penalties and another by Stephen Donald gave Bath a narrow lead late on, with Stuart Hogg having crossed the line for the hosts.
But Gray went over and Weir took his tally to 16 as Glasgow claimed victory.
With in Reading on Saturday, Glasgow complete a Scottish double in the tournament as Bath have to settle for a bonus point.
The Aviva Premiership outfit were forced into an injury-enforced change just before kick-off as Sam Vesty started at centre instead of Matt Banahan.
Ian McGeechan's side pressed hard from the first minute and Glasgow were penalised for not releasing in the tackle and Heathcote successfully kicked his first penalty.
But a Bath infringement allowed Weir to quickly level.
Dan Hipkiss broke well on the right and Bath recycled the ball several times without being able to find a way through the Glasgow defence.
The Warriors were forced to retreat again as Francois Louw threatened but the hosts continued to hold firm.
A mammoth kick by Heathcote from halfway sailed through the posts to regain the lead for Bath.
Handling errors allowed Bath to turnover and put Glasgow under more pressure but Sean Lineen's side survived the onslaught before Weir's second penalty, from near halfway, was short and to the right of the posts.
, was crucial to Glasgow's stout defence and, once they moved upfield, concerted phases eventually led to a penalty from which Weir levelled.
Bath lock Ryan Caldwell and Glasgow scrum-half Chris Cusiter escaped with a telling-off and a shake of hands after a spat at a ruck and the upshot was another successful Weir penalty moments before the break.
A pulled-down scrum at the start of the second half led to another Glasgow penalty but Weir's effort from near the Bath 10m line was wide.
It was the Glasgow scrum that was penalised moments later and Heathcote duly levelled with another accurate kick.
Another infringement, this time trying to pull the ball out at a ruck, allowed Heathcote to kick Bath into the lead once again.
A Glasgow line-out was well won by Gray and the ball was worked forward to substitute Troy Nathan, who laid off well for Hogg to cross the line and claim the game's first try.
But the Warriors were penalised twice in quick succession and Heathcote kicked Bath back into the lead.
The pendulum swung again when Glasgow were awarded another penalty to give Weir a simple kick.
However, another infringement at the scrum gave Bath another penalty and Heathcote's replacement Stephen Donald kicked the English side ahead.
Sean Lineen's side pressed for a winning score and a favourable bounce off Weir's kick allowed Gray to retrieve and force the ball over the line, Weir's conversion completing the win.
Glasgow: Hogg; Seymour, Dewey, Morrison, Shaw; Weir, Cusiter; Grant, MacArthur, Cusack, Gray, Kellock, Harley, Barclay, Wilson.
Replacements: Nathan for Dewey (56), Hall for MacArthur (56), Ryder for Kellock (56), Kalman for Cusack (63), Aramburu for Seymour (63), Fusaro for Barclay (64). Not Used: Reid, Pyrgos.
Bath: Abendanon; Woodburn, Hipkiss, Vesty, Biggs; Heathcote, Claassens; Flatman, Batty, Wilson, Hooper, Caldwell, Louw, Mercer, Taylor.
Replacements: Beech for Flatman (63), Perenise for Wilson (63), Attwood for Caldwell (63), Donald for Heathcote (68), McMillan for Claassens (74). Not Used: Palma-Newport, Spencer, Cuthbert.
Referee: Christophe Berdos (France)