
Gloucester booked an EPCR Challenge Cup quarter-final clash against west country rivals Bath after beating Montpellier 24-17 in France.
The Gallagher Premiership play-off contenders dug deep to recover from a 14-point deficit after just nine minutes.
Tries from Anthony Bouthier and Hugo Reus, who converted both, gave Montpellier a flying start.
But Gloucester weathered the storm and drew level following touchdowns by Wales international Freddie Thomas and his fellow forward Cameron Jordan.
Santi Carreras kicked two conversions, only for Montpellier to regain the lead through a Reus penalty on the stroke of half time.
Gloucester had scrum-half Caolan Englefield yellow-carded early in the second period, yet they regained the lead while he was still off the pitch when Ruan Ackermann crossed for try number three and Carreras again converted.
The visitors held on to their advantage and Carreras made sure of victory when he kicked a penalty in the last minute to set up an intriguing all-Premiership encounter.
South African challengers the Bulls moved into the last eight, meanwhile, after a 32-22 win at Bayonne, with David Kriel and Marco van Staden among their try-scorers.