Ten-man Hearts' Europa League dreams are over after defeat to FC Zurich - but they will still play group-stage football for the first time since 2004.
Trailing 2-1 from the first leg in Switzerland, Hearts swarmed their opponents before the break and ought to have at least been level on aggregate.
But they were derailed early in the second half when Jorge Grant was sent off after being shown a second yellow card for diving in the box, and Fabian Rohner slammed in the winner for the Swiss champions with 11 minutes left.
Hearts will have to settle for the Europa Conference League, still a fine reward for their third-place finish in the Scottish Premiership last term, as Zurich take their spot in the more glamorous Europa League.
"If the defender goes off his feet and goes to ground and doesn't make contact on the ball, the attacker is under no obligation to move out the way," Hearts boss Robbie Neilson told BBC Scotland of the decision to send Grant off.
"My opinion is it's a penalty, but we have to accept it."
Europe's third-tier competition is still something to savour for Neilson, but he and his side will rue the fact they were masters of their own downfall at an initially raucous Tynecastle.
The home fans leered at every tackle and roared their men on, and the Edinburgh side responded well with a glut of first-half chances, but were profligate and hesitant in the final third.
Liam Boyce missed the best of their opportunities, the striker leaped up at the back post and headed down into the ground with the goal gaping, but the ball spurted over the bar.
Alan Forrest also had a great chance after a fine move, but took too long to get a shot away as the Zurich defence recovered to block his low shot.
Hearts' chances of maintaining the momentum they had fostered were smashed on 54 minutes when Grant went down early to anticipate a challenge that came later than he was expecting, to pick up a second caution.
From there belief slowly drained from the home side despite some good moments, and Rohner ended any lingering hope as he lashed in past Craig Gordon, who was hit by an object thrown from the away end in the second half, to take Zurich clear on aggregate and into the Europa League.
Man of the match - Barrie McKay
Hearts rue mistakes - analysis
The first half was as good as Hearts have played in 2022. They were relentless without the ball and totally bullied Zurich, turning over possession quickly and attacking at pace, with McKay and Forrest a real threat.
But the lesson they must take into the Conference League is to be more clinical, and overall they were the masters of their own downfall.
In the first leg, they conceded two soft goals in quick succession after going ahead, and at Tynecastle they wasted their chances before Grant cost his team with a rush of blood in the box.
In fairness to the midfielder, his first yellow card for a tackle was probably harsh, but knowing he was on a yellow and going down in the way he did was daft.
Overall, they can park this result and look forward to Friday's Conference League draw, where they are guaranteed six games and plenty of good teams.
This defeat goes down as a lesson learned and a chance to improve for the next test, with Fiorentina, West Ham, Villareal, and AZ Alkmaar just some of the names in the draw.
What they said
Hearts head coach Robbie Neilson: "I thought we were absolutely outstanding. Until the sending off, we were the better team, we dominated.
"We just couldn't take that moment when it came. When you get to this level you've got to take the chances, but the pleasing thing is we're getting them."
It's back to league action for Hearts as they host St Johnstone in the Scottish Premiership on Sunday (15:00 BST), but before that they can look forward to the group stage draw on Friday (13:30).
- 3KingsleySubstituted forSibbickat 78'minutes
- 15RowlesBooked at 42mins
- 14DevlinSubstituted forSmithat 84'minutes
- 7GrantBooked at 54mins
- 17ForrestSubstituted forGinnellyat 64'minutes
- 10BoyceSubstituted forHaringat 64'minutes
- 9ShanklandBooked at 47mins
- 17CondeBooked at 33minsSubstituted forHornschuhat 45'minutes
- 8SelnæsBooked at 69mins
- 3GuerreroSubstituted forAlitiat 90+1'minutes
- 10MarchesanoSubstituted forRohnerat 79'minutes
- 18AvdijajSubstituted forGnontoat 45'minutes
- 20ViunnykSubstituted forTosinat 63'minutes
- 34De Nitti
- Lawrence Visser
- Shots on Target