London Wasps survived a Gloucester fightback to secure an Amlin Challenge Cup home semi-final against Bath.
Andy Goode's drop goal and Matt Mullan's try gave Wasps a solid lead.
Carlo Festuccia extended the advantage, but Gloucester replied through Jonny May and Gareth Evans while Wasps' Nathan Hughes was in the sin bin.
The home side looked rattled, but two Goode penalties and a Will Helu try eased the nerves before Martyn Thomas's consolation at the death.
It means Bath, who beat Brive earlier in the day, will travel to Adams Park on 27 April, with Northampton Saints hosting Harlequins two days earlier in an all-English semi-final line-up.
Both of these sides fell at this stage of the competition last season and, with limited hope for either team of breaking into the Premiership's top six, there were two strong line-ups named.
Gloucester were forced into a reshuffle before kick-off though, with Freddie Burns coming it at 10 for injured centre Mike Tindall, whose horse Monbeg Dude finished seventh in the Grand National on Saturday.
For a long stretch of the first half only Goode's drop goal separated the sides, with Joe Simpson's unsuccessful chase down after a loose ball was hacked through the closest to a score.
But Wasps produced the first genuine spell of sustained pressure, with the forwards - and Hughes in particular - seeing them through the phases before Simpson teed up Mullan who crashed over.
Goode picked up the extras and added a penalty to his tally after Rob Cook had sent over one of his own for Gloucester.
The former England fly-half almost had Andrea Masi in with a cleverly chipped kick and, although the Italian was held up at the line, it gave Wasps the launchpad for Festuccia to wriggle over.
It was unclear in video replays whether Festuccia had actually touched the ball down, but the television match official decided there was no reason to deny the try. Goode converted and then added a penalty.
With Dai Young's side seemingly coasting, Gloucester were handed a lifeline when Hughes found himself in the sin bin for coming in from the side and the Cherry and Whites took full advantage.
England wing May flew over in the corner when taking in a wonderful long pass from Burns before Evans bulldozed his way to the line.
Cook hit both conversions as Gloucester pulled to within six points, but Goode relieved the pressure by coolly sending two penalties between the posts.
And Helu confirmed Wasps' place in the last four by following up when Elliot Daly failed to gather his own box kick, meaning Thomas's score moments before the finish was in vain.
London Wasps: Masi; Short, Daly, Bell (capt), Helu; Andy Goode, Simpson; Mullan, Festuccia, Cooper-Woolley; Launchbury, Myall; Jones, Haskell, Hughes.
Replacements: Hayter for Masi (45), Palmer for Myall (51), Lindsay for Festuccia (56), Swainston for Cooper-Woolley (63), Thompson for Jones (66), McIntyre for Mullan (71), Davies for Simpson (77), Carlisle.
Gloucester: Cook; Sharples, Trinder, Twelvetrees (capt), May; Burns, Cowan; Wood, George, Knight; Stooke, Hudson; Kalamafoni, Kvesic, Morgan.
Replacements: James for Hudson (47), Evans for Morgan (50), Knoyle for Cowan (50), Y. Thomas for Knight (52), Puafisi for Wood (52), M. Thomas for Burns (71), Young for Kvesic (79), Murphy.
Referee: Marius Mitrea