Gloucester booked a place in the Amlin Challenge Cup quarter-finals on Friday thanks to a 31-26 victory over Bordeaux-Begles in France.
Freddie Burns kicked two penalties in the last five minutes to snatch a dramatic victory that ensures Glocuester will finish top of Pool One.
Burns finished with 26 points courtesy of eight penalties as well as the conversion of Darren Dawiduik's try on the half-hour but bottom side Bordeaux outscored their English opponents by two tries to one at the Stade Andre Moga.
Bordeaux had led for large parts of the match thanks to two first-half tries through Rafael Carballo and Tamato Leupolu but couldn't hold on as Gloucester rallied in the dying minutes.
Tries: Carballo, Leupolu
Cons: Munro 2
Pens: Munro 4
Yellow card: Chauveau
Pens: Burns 8
Yellow card: Edmonds
Bordeaux-Begles: 15 Lachie Munro, 14 Rafael Carballo, 13 Charles Brousse, 12 Michel Denetre, 11 Thierry Brana, 10 Camille Lopez, 9 Julien Seron, 8 Damien Larrieu, 7 Rohan Kitshoff, 6 Gauthier Gibouin, 5 FranÃ§ois Tisseau, 4 Andrew Chauveau, 3 Tamato Leupolu, 2 Hikairo Forbes, 1 Jefferson Poirot.
Replacements: 16 Fabien Rofes, 17 Franck Labbe, 18 Nicolas Descamps, 19 Carolis Navickas, 20 Hugh Chalmers, 21 FÃ©lix Le Bourhis, 22 Baptiste Serin, 23 Louis Madaule.
Gloucester: 15 Rob Cook, 14 Charlie Sharples, 13 Henry Trinder, 12 Tim Molenaar, 11 Jonny May, 10 Freddie Burns, 9 Dan Robson, 8 Ben Morgan, 7 Akapusi Qera, 6 Sione Kalamafoni, 5 Will James, 4 Jim Hamilton (capt), 3 Dario Chistolini, 2 Darren Dawidiuk, 1 Nick Wood.
Replacements: 16 Huia Edmonds, 17 Dan Murphy, 18 Shaun Knight, 19 Peter Buxton, 20 Gareth Evans, 21 Dave Lewis, 22 Mike Tindall, 23 Martyn Thomas.
Venue: Stade AndrÃ© Moga
Referee: Andrew McMenemy (Scotland)
Assistant referees: Peter Allan (Scotland), Bob Nevins (Scotland)
Timekeeper: Bernard Perez (France)
Assessor: Eric Darriere (France)