Lawrence Shankland’s late header gave Hearts genuine hope of progressing to the Europa Conference League play-off round despite defeat by Rosenborg in Norway.
A faltering first-half showing from the visitors allowed Rosenborg to establish a two-goal lead through Emil Frederiksen and Jayden Nelson.
But Hearts provided much sterner opposition after the break and began to dominate before their talismanic captain gave them a way back into the tie.
Rosenborg, who had bossed the opening half, held on for the victory but their advantage is considerably more slender than looked likely at one stage.
The second leg will be live on BBC Scotland next Thursday at 19:45 BST, with the winners facing either Hajduk Split or PAOK.
The return of Beni Baningime is undoubtedly a boon for Hearts but the midfielder was bested way too easily by 16-year-old Sverre Nypan for the opening goal.
The teenager evaded Baningime on the bye-line before picking out the inrushing Frederiksen, who bundled in his first goal for the club on just his second start, with Alex Cochrane powerless to prevent the ball crossing the line.
And just as it looked as though Hearts would get to half-time without incurring further damage, Baningime gave the ball away, allowing Rosenborg to counter.
As the former Everton player tried to haul down the advancing Nypan, the youngster slipped the ball to Nelson to convert the second from close range.
Hearts improved after the break, gradually pushing the Norwegians back and, found the back of the net with virtually their first effort on target.
Substitute Stephen Kingsley sent in a wicked delivery from the left and Shankland towered over the Rosenborg defence to head back across Andre Hansen for a second goal of the season.
Player of the match – Sverre Nypan
Under-cooked Hearts restore belief after break – analysis
Without wishing to be overly harsh on a player who has missed almost a year-and-a-half of football, the decision to start Baningime backfired.
He looked tentative with his touch and passing and, though the Hearts management team clearly felt he was ready, his rustiness allowed Rosenborg to profit.
His half-time replacement Peter Haring helped steady the ship, allowing Hearts to build a platform from which they began to exert their authority.
Frankie McAvoy had pre-empted the disparity in preparedness for this match and Hearts definitely looked under-cooked compared to an opponent midway through the league season.
But such are the obstacles facing Scottish teams with ambitions of European progress, and Hearts are not the first nor will they be the last to fall foul of this scenario.
Nonetheless, a much-improved second-half showing must give Hearts real belief they can turn the tie on its head at Tynecastle next week.
What’s next?
Hearts host Kilmarnock on Sunday (15:00 BST) before welcoming Rosenborg to Tynecastle next Thursday (19:45 BST).
Line-ups
Rosenborg
- 1Hansen
- 19Pereira
- 23Yttergård Jenssen
- 25AnderssonSubstituted forCornicat 88′minutes
- 2Reitan
- 41NypanSubstituted forSkjelbredat 88′minutes
- 11NelsonSubstituted forVäänänenat 74′minutes
- 8Børkeeiet
- 10Holse
- 17ThorvaldssonSubstituted forWiedesheim-Paulat 62′minutes
- 14Frederiksen
Substitutes
- 5Skjelbred
- 6Väänänen
- 15Rogers
- 16Røsten
- 18Bjørlo
- 20Tagseth
- 21Skarsem
- 24Tangvik
- 28Wiedesheim-Paul
- 32Cornic
- 44Holte
Hearts
- 28Clark
- 19Cochrane
- 2Kent
- 13Atkinson
- 15Rowles
- 6BaningimeSubstituted forHaringat 45′minutes
- 51LowrySubstituted forGrantat 62′minutes
- 9ShanklandBooked at 54mins
- 17ForrestSubstituted forKingsleyat 62′minutes
- 11OdaSubstituted forBoyceat 84′minutes
- 14DevlinBooked at 14minsSubstituted forDenholmat 71′minutes
Substitutes
- 3Kingsley
- 5Haring
- 7Grant
- 10Boyce
- 12McGovern
- 16Halliday
- 21Sibbick
- 22Denholm
- 27Smith
- 36McFarlane
- 37Rathie
- 54Wilson
Live Text
-
Match ends, Rosenborg 2, Heart of Midlothian 1.
-
Second Half ends, Rosenborg 2, Heart of Midlothian 1.
-
Substitution, Rosenborg. Per Skjelbred replaces Sverre Nypan.
-
Substitution, Rosenborg. Leo Cornic replaces Adam Andersson.
-
Substitution, Heart of Midlothian. Liam Boyce replaces Yutaro Oda.
-
Goal! Rosenborg 2, Heart of Midlothian 1. Lawrence Shankland (Heart of Midlothian) right footed shot from the centre of the box to the centre of the goal.
-
Substitution, Rosenborg. Santeri Väänänen replaces Jayden Nelson.
-
Substitution, Heart of Midlothian. Aidan Denholm replaces Cameron Devlin.
-
Substitution, Heart of Midlothian. Jorge Grant replaces Alex Lowry.
-
Substitution, Rosenborg. Rasmus Wiedesheim-Paul replaces Ísak Thorvaldsson.
-
Substitution, Heart of Midlothian. Stephen Kingsley replaces Alan Forrest.
-
Lawrence Shankland (Heart of Midlothian) is shown the yellow card for a bad foul.
-
Substitution, Heart of Midlothian. Peter Haring replaces Beni Baningime.
-
Second Half begins Rosenborg 2, Heart of Midlothian 0.
-
First Half ends, Rosenborg 2, Heart of Midlothian 0.
-
Goal! Rosenborg 2, Heart of Midlothian 0. Jayden Nelson (Rosenborg) right footed shot from the centre of the box to the centre of the goal.
-
Cameron Devlin (Heart of Midlothian) is shown the yellow card for a bad foul.
-
Goal! Rosenborg 1, Heart of Midlothian 0. Emil Frederiksen (Rosenborg) right footed shot from the centre of the box to the centre of the goal.
-
Lineups are announced and players are warming up.