Hibernian take a crucial advantage to North Macedonia for their Conference League third round qualifier second leg after Warren O'Hora's 90th-minute goal snatched victory against Shkendija.
David Gray's side are attempting to reach the group/league stage of European competition for the first time and had to show patience before Owen Elding tapped home a crucial opener.
That was levelled almost instantly by substitute Marko Gjorgjievski from close range before late drama earned victory.
Captain Martin Boyle was passed fit despite concern over an Achilles issue but the occasion didn't live up the billing until late on as both sides struggled to threaten.
Elding came closest in the first half to the breakthrough when he drove from deep and fired a low angled shot narrowly past the far post.
Shkendija looked well organised throughout and showed flashes of pace on the counter-attack to deliver moments of concern.
The introduction of Ante Suto and Callum Wright on the hour seemed to spark some energy into Hibs. And it was Wright who unlocked Shkendija down the left, taking on two defenders and squaring for Elding to touch home.
It's often said teams can be vulnerable just after scoring and so it proved. The defending was poor as Gjorgjievski stole into the area and found the far corner.
It seemed a stalemate would be the outcome before O'Hora pounced after the ball struck the post to tap home and earn a vital win, which could have been bigger had fellow defender Jason Kerr's header hit the net rather than the bar.
The victor in this tie will face either IFK Goteborg or Gent, who take a 1-0 first leg lead back to Belgium for the return fixture.