Champions Cup novices La Rochelle are through to the quarter-finals at the first attempt as winners of Pool 1 but a spirited Harlequins performance prevented them from getting a home tie.
The under-strength Quins side won the second half after conceding 13 points in the opening 40 minutes and gave director of rugby John Kingston plenty to feel proud about despite a 16-7 defeat.
Wasps were hoping Quins could do them a favour by beating La Rochelle, but they had to be content with their own bonus-point victory at the Ricoh Arena that knocked out Ulster.
The French side, playing in front of a 29th successive full house at Stade Marcel-Deflandre, got off to a fast start and enjoyed three minutes of continuous possession.
Only a knock-on from back-row Afa Amosa stopped them from scoring an opening try, although they picked up a penalty which scrum half Alexi Bales kicked to get the scoreboard moving.
Quins lost England and British & Irish Lions prop Kyle Sinckler before kick-off and their scrum was under huge pressure for most of the game. They were under constant examination from the power of the home pack and they gave away a stream of penalties at the breakdown.
One of those for side entry midway through the first half gave the home side the chance to take a scrum five metres out. That was held up, but when the ball was released the outside-half Jeremy Sinzelle sent his centre Pierre Aguillon racing over.
There was a second try before half-time to stretch the lead to 13 points when new French prop Dany Priso dummied his way into the 22 and then sent full back Kini Murimurivalu over in the left corner.
Quins galvanised themselves in the second half and, six minutes after the restart, scrum-half Danny Care sniped his way over from a few metres out after helping to stretch La Rochelle from right to left and then back again.
Marcus Smith, who twice had to pick himself up after injuring his ankle and his eye in the first half, added the conversion and the visitors were right back in the contest. La Rochelle went back to their power play and, after destroying the Quins scrum, Bales kicked a second penalty.
Just after the hour mark a clever kick to the posts by Smith forced La Rochelle to concede a penalty. Quins used Mat Luamanu to charge for the line and three times they were held short before Ross Chisholm lost the ball.
A second penalty for offside allowed them to kick to the corner and although their driving line-out was held up, Chisholm was released to drive for the line.
He was tackled inches short by Botia Veivuke and turned over to save a score.