Harlequins survived a second-half onslaught from Cardiff Blues to seal their European Challenge Cup quarter-final place with a 34-26 victory.
Quins appeared to be cruising toward the last eight after running in four first half tries at The Stoop, but Cardiff rallied after the break and the hosts were left clinging on as they secured top spot in Pool 3 and a home draw in the knockout stages.
Rob Buchanan, Jack Clifford, Marland Yarde and Ross Chisholm were all on the scoresheet for the Premiership side as they dominated the opening 40 minutes, with Nick Evans coolly converting all four tries.
Their 28-0 lead at the break quickly began to evaporate, though, as Cardiff surged back into contention thanks to a Dan Fish double and scores from Cory Allen and Lloyd Williams.
Luckily for Quins their first-half exploits proved to be enough as penalties from Evans and Ben Botica helped preserve the advantage and complete the bonus-point win, keeping the London club's 100 per cent record at home this season intact.