World Cup winner Stephen Donald re-ignited Bath's European campaign with a tense victory over Montpellier.
The New Zealander created the opening try for Olly Woodburn and scored two penalties, with David Flatman also going over for the home side.
Winger Martin Bustos Moyano gave the French outfit a glimmer of hope with a try, a conversion, and a penalty in the space of five second-half minutes.
But Bath held on to secure their first Heineken Cup win of the season.
After losing at Glasgow last weekend, Bath knew they could not afford a second successive defeat and effectively risk pool stage elimination, a fate seemingly destined for their fellow English representatives Northampton, Gloucester and London Irish.
But although they took charge early on, with wing Woodburn and prop Flatman scoring tries, Montpellier hit back through the efforts of wing Bustos Moyano.
He scored a try and added eight points from the boot, hauling the visitors back into contention after they trailed by 13 points early in the second half.
Bath made a blistering start, establishing an 8-0 lead after just nine minutes before Donald, whose penalty secured the World Cup for the All Blacks, kicked a short-range penalty and then floated a pin-point long pass to an unmarked Woodburn.
The Kiwi managed to free centre Dan Hipkiss, and after he was hauled down just short of the line, Bath worked Flatman over on an overlap for a 13-point advantage.
Bustos Moyano kicked a penalty from halfway to cut Bath's advantage, but missed two more as the home side retained a comfortable lead.
Donald booted a 44th-minute penalty before Bustos Moyano's scored a try, converted it, and then added an angled penalty.
Montpellier had scored 10 points in five minutes, but Bath held on for the win.
Bath: Abendanon, Woodburn, Hipkiss, Vesty, Biggs, Donald, Claassens, Flatman, Batty, Wilson, Hooper, Caldwell, Louw, Moody, Taylor.
Replacements: Barkley for Vesty (75), McMillan for Claassens (72), Beech for Flatman (55), Lilley for Batty (48), Perenise for Wilson (55). Not Used: Attwood, Mercer, Cuthbert.
Montpellier: Gonzalez Amorosino, Bustos Moyana, G. Doumayrou, Bosch, Peyras-Loustalet, Trinh-Duc, J. Tomas, Nariashvili, Creevy, Bustos, Tuineau, Privat, Mertin, Ouedraogo, Gorgodze.
Replacements: Audrin for Bustos Moyana (63), Paillaugue for J. Tomas (61), Leleimalefaga for Nariashvili (48), Jansen van Vuuren for Creevy (59), Jgenti for Bustos (59), Hancke for Tuineau (69), Matadigo for Privat (69). Not Used: Fernandez.
Referee: Alain Rolland (Ireland).