Cammy Devlin scored a stoppage-time winner as Hearts mounted a stirring fightback from two goals behind on aggregate to eliminate Rosenborg in a dramatic Europa Conference League third qualifying-round tie.
The Jambos, already trailing 2-1 from the first leg in Norway, came from behind in the second leg at a packed Tynecastle to win 3-1 on the night and secure a 4-3 triumph over the two legs, setting up a play-off with Greek side PAOK later this month.
The Norwegians looked to be in full control when an early goal from Isak Thorvaldsson put them 3-1 ahead on aggregate.
But the Jambos came roaring back to level the tie through goals from captain Lawrence Shankland and Devlin. The Australian midfielder then sparked bedlam with his second of the night in added time.
Hearts made three changes to the team that started Sunday’s goalless draw at home to Kilmarnock in the cinch Premiership as 19-year-old Aidan Denholm came in for his first competitive start along with Liam Boyce and Alex Cochrane, while Peter Haring, Alex Lowry and Kyosuke Tagawa dropped out.
A sold-out Tynecastle was at its raucous best as the teams emerged from the tunnel, but the Norwegians silenced the home support just six minutes in.
Thorvaldsson did the damage when he drilled the rebound over the line from the edge of the six-yard box after goalkeeper Zander Clark had done superbly to keep out the striker’s initial header from an Adrian Pereira free-kick.
Hearts almost equalised two minutes later, but Yutaro Oda smashed an angled shot off the far post after being played in to the box on the right by Shankland.
Clark had to make an impressive save in the 12th minute to prevent Rosenborg stretching their lead when he got down to his left to stop Emil Frederiksen finding the net with a low shot from eight yards out after the attacker had got himself clear inside the box.
It proved a pivotal moment as Hearts went straight up the pitch and scored.
Left-back Stephen Kingsley clipped a speculative through-ball in behind and Shankland managed to get himself clear before producing a lovely finish as he nonchalantly chipped the advancing Andre Hansen from the edge of the box.
The Jambos were suddenly full of confidence and they had a great chance to level the tie on aggregate in the 28th minute when Shankland ran on to an Oda pass down the right and saw his angled shot blocked by the legs of the keeper when he had Boyce in the middle begging for the ball to be squared.
Hearts continued in the ascendancy for the remainder of the first half.
In the 40th minute Kye Rowles headed over from Kingsley’s cross and seconds later Cochrane saw a firm low shot from the edge of the box saved by Hansen.
The hosts survived a scare four minutes after the restart when Nathaniel Atkinson had to hook the ball off the goal-line after his own attempt to clear a cross into the six-yard box ricocheted back off team-mate Rowles.
Seconds later Hearts went ahead on the night and levelled the tie on aggregate when Devlin followed up to smash a loose ball high into the net from a few yards out after Boyce’s powerful shot from 12 yards out was blocked by Hansen.
And Devlin had the final say in added time when his low deflected shot from the edge of the box found the net, sparking jubilant scenes inside Tynecastle.