Biarritz Olympique booked a home Heineken Cup quarter-final in San SebastiÃ¡n by coming from behind to beat an inspired Glasgow side 41-20 at soggy Parc des Sports Aguilera on Sunday.
The visits made light of the decidedly Scottish conditions in the south of France, with Chris Cusiter getting on the end of one of the tries of the season.
But the locals had too much in the tank - and at stake - and powered home in the final quarter of the game, clinching the crucial bonus point 50 seconds from the final whistle to guarantee home advantage in the last eight.
Eduard Coetzee and Takudzwa Ngwenya crossed before Ilikena Bolakoro followed a Penalty Try to wrap up maximum points and inflict a fourth defeat on Glasgow.
Biarritz had already reserved their place in the quarter-finals after winning four of their previous pool games, however they were without key playmakers Dimitri Yachvili and Damien Traille through injury while fly-half Julien Peyrelongue was rested.
It was Peyrelongue's replacement, Valentin Courrent, who stepped up to open the scoring in the fourth minute with a penalty but Glasgow who managed to handle the muddy conditions well early on.
Flanker John Barclay hammered a hole through the heart of the Biarritz defence but it was the vision of Cusiter that created the first try.
The Scotland scrum-half found Evans out wide in open space with an intelligent kick and the flying wing easily went past prop Mosese Moala before scooping up possession and diving over despite Bolakoro's lunge.
Parks expertly guided his conversion through the posts from close to the touchline for a surprise 7-3 lead.
That advantage soon grew as Glasgow dominated the close-quarter exchanges. Second-row forward Richie Gray's charge led to a second Parks penalty, and a neat interchange of passes between Max Evans, John Beattie and Cusiter ended in a third as the visitors stunned the partisan home crowd by leading 13-3.
That sparked a change in tempo and tactics from Biarritz which reduced the deficit to 13-11 by half-time. Courrent kicked a 28th-minute penalty but was off target five minutes later, and he missed again after prop Coetzee was shoved over the line by the rest of the Biarritz pack three minutes before the break.
The second half got off to a tremendous start for Glasgow, despite Parks missing for the first time, with a contender for try of the season in the Heineken Cup so far.
Full-back Bernardo Stortoni launched an audacious attack with a quickly taken penalty just 10 metres from the Glasgow try-line, and it ended with Cusiter sliding between the Biarritz posts.
Stortoni burst from defence and exchanged passes with Max Evans before handing Cusiter a 25-metre dash to score.
Parks' conversion moved Glasgow 20-11 ahead after 48 minutes but that was to be the last time they had any grip on the tie.
Biarritz turned their fortunes around in the scrum, with replacement Kiwi prop Campbell Johnstone having an impact, and with more firepower following off the bench that dominance up front led to 30 unanswered points.
Courrent drew Biarritz level with three successive penalties before wing Ngwenya made light work of Hefin O'Hare's flapping attempt at a tackle to race clear for a try that put the hosts ahead for the first time since the 10th minute.
The home side's advantage in the scrum forced referee Dave Pearson to award a penalty try after 69 minutes, but it took until the last minute of the game before they clinched the vital bonus point when Bolakoro raced on to Imanol Harinordoquy's break to score.
For Biarritz Olympique:
Tries: Coetzee, Ngwenya, Penalty Try, Bolakoro
Cons: Courrent 3
Pens: Courrent 5
For Glasgow Warriors:
Tries: Evans, Cusiter
Cons: Parks 2
Pens: Parks 2
Biarritz Olympique: 15 Paul Couet-Lannes, 14 Takudzwa Ngwenya, 13 Arnaud Mignardi, 12 Laurent Tranier, 11 Ilikena Bolakoro, 10 Valentin Courrent, 9 Yann Lesgourgues, 8 Imanol Harinordoquy, 7 Trevor Hall, 6 Magnus Lund, 5 Pelu Taele, 4 JÃ©rÃ´me Thion, 3 Mosese Moala, 2 Benoit August, 1 Eduard Coetzee.
Replacements:16 Romain Terrain, 17 RÃ©my Hugues, 18 Campbell Johnstone, 19 Manuel Carizza, 20 Fabien Alexandre, 21 Karmichael Hunt, 22 Ayoola Erinle, 23 Iain Balshaw.
Glasgow Warriors: 15 Bernardo Stortoni, 14 Rob Dewey, 13 Max Evans, 12 Graeme Morrison, 11 Thom Evans, 10 Dan Parks, 9 Chris Cusiter, 8 Johnnie Beattie, 7 John Barclay, 6 Kelly Brown, 5 Alastair Kellock (capt), 4 Richie Gray, 3 Moray Low, 2 Dougie Hall, 1 Jon Welsh.
Replacements: 16 Fergus Thomson, 17 Kevin Tkachuk, 18 Ed Kalman, 19 Dan Turner, 20 James Eddie, 21 Mark McMillan, 22 Ruaridh Jackson, 23 Hefin O'Hare.
Referee: David Pearson (England)
Assistant referees: Sean Davey (England), Paul Dix (England)
Television match official: Graham Hughes (England)