Solomoni Rasolea's dramatic 77th-minute try helped Edinburgh clinch a place in the European Challenge Cup quarter-finals with a stunning 34-33 victory over Stade Francais on Friday.
Stade needed a win to keep their chances of stealing top spot in Pool 4 alive, but Rasolea denied them at the death, extending the hosts' 100 per cent record in the competition and guaranteeing a home match in the next stage.
Four penalties from Sam Hidalgo-Clyne gave Edinburgh a 12-6 half-time advantage, but Sekou Macalou, Waisea Vuidarvuwalu and Giorgi Melikidze all crossed as the lead changed hands repeatedly in an enthralling second half.
Hamish Watson and Jaco van der Walt kept Richard Cockerill's men in the fight before Rasolea had the final say.
FULL TIME | Edinburgh seal the win in dramatic fashion as Rasolea's late score seals our passage to the knockout stages! (34-33)#EDIvSFPpic.twitter.com/IMJnUTTtat-- Edinburgh Rugby (@EdinburghRugby) January 12, 2018
Stade must now hope to qualify as one of the best second-placed teams, though one of those is guaranteed to come from Pool 3 following Gloucester's 45-24 thumping of Agen.
The Premiership side moved onto 21 points, meaning they will advance even if they lose a shootout for top spot against Pau at Kingsholm next week.
Henry Purdy crossed twice inside the opening 10 minutes and Owen Williams kicked a perfect 15 points from the tee as Gloucester came out on top in a 10-try match.
Gloucester Rugby are now on 21 points and have guaranteed a quarter-final place!-- Challenge Cup (@ERChallengeCup) January 12, 2018
The Cherry & Whites will either be a best runner-up or depending on future results, Pool 3 winners. pic.twitter.com/Bpjctri22L