Hearts' hopes of reaching the Europa League group stage remain in the balance despite succumbing to a spirited comeback by Swiss champions FC Zurich.
Lawrence Shankland's penalty put Hearts ahead in the play-off first leg in St Gallen, but Zurich scored twice in two minutes before the break through Adrian Guerrero and Blerim Dzemaili.
And although Hearts mustered a stronger finish, goalkeeper Craig Gordon produced a vital save in the last minute to keep the deficit at one goal.
Robbie Neilson's side are already guaranteed group-stage football in the Europa Conference League, but will aim to overturn the deficit in Edinburgh next Thursday and join the likes of Manchester United and Arsenal in the second-tier competition.
But they will have to improve on their first-leg showing where, despite taking an early lead against a side rooted to the bottom of the Swiss top flight and playing 80km away from their home ground, they were sloppy in possession and loose at the back in a costly spell before the break.
Shankland gave them a great start when he fired a controlled penalty low into the corner after Nathaniel Atkinson was felled in the box, but Zurich levelled on 32 minutes in frustratingly simple fashion.
The loss of centre-back Craig Halkett to injury after six minutes was keenly felt as a long ball forward from the Zurich goalkeeper was headed up in the air by Atkinson, and Guerrero was quickest to react as he lashed a volley beyond the helpless Gordon.
Then, two minutes later, Peter Haring was robbed in midfield as Zurich launched a counter-attack and, after two balls into the box weren't dealt with, Dzemaili smashed a fantastic shot into the top corner from 15 yards.
Hearts improved in the final quarter when striker Liam Boyce was brought on and, with better decision-making in the final third, might have drawn level.
But before that Zurich could have added further goals, with former Hearts player Donis Avdijaj going close twice and Guerrero slicing another volley just wide.
And in the 89th minute substitute Fabian Rohner charged through on goal and looked certain to add Zurich's third, only for Gordon to deny him with his outstretched leg.
Man of the match - Blerim Dzemaili
Dzemaili was an assured presence in midfield and took his goal expertlyHearts cause own downfall
Despite being winless in their first five games in the Swiss league, Zurich were always going to pose a greater threat than their form suggested, even playing away from their own ground, which was unavailable because of hosting a concert.
Even still, after playing solidly in the opening quarter and getting themselves in front, Hearts will be kicking themselves at how easily they let their opponents back into the game.
The loss of Halkett and the torrential rain did not help, but Atkinson in particular was brutally exposed before being substituted at half-time. And the visitors were too slack in possession, only completing 57% of their passes in Zurich's half before the break.
Neilson will still back his squad at what will be a raucous Tynecastle but the loss of Halkett, who emerged on crutches to take his place on the bench for the second half, is a concern in defence and they will need to offer far more of a threat from open play.
What they said
Hearts head coach Robbie Neilson: "Two years ago, we were playing against Queen of the South on a Friday night in the Championship. We're here against the Swiss champions, we've lost 2-1 but put on a brilliant performance.
"We go back to Tynecastle next Thursday, the place will be rocking and we've given ourselves a right good chance."
What's next?
Hearts visit Scottish champions Celtic in the Premiership on Sunday (15:00 BST) before welcoming Zurich to Tynecastle next Thursday (20:00) for the play-off second leg.
Line-ups
Zürich
Formation 3-5-2
25Brecher
4Omeragic31Kryeziu28Mets
19Boranijasevic21Dzemaili8Selnæs10Marchesano3Guerrero
20Viunnyk18Avdijaj
25Brecher4Omeragic31Kryeziu28MetsSubstituted forAlitiat 83'minutes19Boranijasevic21DzemailiSubstituted forCondeat 74'minutes8Selnæs10MarchesanoBooked at 22mins3GuerreroBooked at 47mins20ViunnykSubstituted forRohnerat 71'minutes18AvdijajSubstituted forGnontoat 71'minutesSubstitutes
1Kostadinovic6Aliti7Krasniqi9Santini11Okita15Tosin17Conde22Gnonto23Rohner33Seiler34De Nitti35SauterHearts
Formation 5-3-2
1Gordon
12Atkinson4Halkett3Kingsley15Rowles19Cochrane
14Devlin5Haring7Grant
9Shankland18McKay
1Gordon12AtkinsonSubstituted forSmithat 45'minutesBooked at 90mins4HalkettSubstituted forSibbickat 7'minutesBooked at 86mins3Kingsley15Rowles19Cochrane14Devlin5HaringSubstituted forBoyceat 70'minutes7GrantSubstituted forForrestat 70'minutes9ShanklandSubstituted forGinnellyat 90+3'minutes18McKay