Slovenia suffered a night of frustration as Ukraine moved through to Euro 2016.
Ukraine finally ended their play-off curse by beating 10-man Slovenia 3-1 on aggregate to reach Euro 2016 after drawing the second leg 1-1 on Tuesday.
The country had lost five two-legged play-off matches to reach major tournaments in 1998, 2000, 2002, 2010 and 2014 but held on to progress to the tournament in France next year.
Slovenia captain Bostjan Cesar ensured they would be in for a nervous night by heading in an early opener and it was he who came closest to scoring a second that would have sent the tie to extra-time, forcing Andriy Pyatov into a vital late save.
Ukraine were deserving of their place in the Euros, though, having kept Samir Handanovic busy throughout the contest as they looked to put the match beyond doubt, before sealing their progression with Andriy Yarmolenko's goal deep into stoppage time.
Yevhen Konoplyanka tested Handanovic with a bouncing early free-kick, but it was the hosts who struck first on 11 minutes in a perfect start to their attempt to make a second-leg comeback.
Valter Birsa whipped in a cross and Roman Bezjak saw his header pushed out by Pyatov. Milivoje Novakovic attempted to stab in the rebound during the ensuing scramble, but that effort was blocked by Artem Fedetskiy, before Cesar finally planted a firm header home at the back post.
Ukraine made a decent response with Yevhen Seleznyov shooting straight at Handanovic from long range and then forcing the Inter goalkeeper to parry away his effort from a tight angle after being played in by Konoplyanka.
Konoplyanka shot over as the visitors pressed again, but Slovenia almost levelled the tie when Nejc Pecnik headed off target from a presentable opportunity created by Birsa's free-kick.
Pyatov unconvincingly dealt with a Pecnik shot shortly before half-time as the home side went into the break with half of the first-leg deficit eradicated.
Ukraine knew an away goal would all but seal their place in France next year and Konoplyanka cut inside from the left early in the second half and arrowed in a shot that Handanovic got down well to save.
A tense period followed with neither side in the ascendancy before the Slovenia keeper was again called upon, saving from Viacheslav Shevchuk with his legs and tipping an Andriy Yarmolenko effort wide.
Yaroslav Rakitskiy lashed a powerful shot just over after the resulting corner fell into his path, but Ukraine were growing frustrated by their inability to kill the tie.
Cesar almost punished the visitors by scoring a second header from Birsa's cross, but Pyatov dived to make an excellent save at his near post.
Rene Krhin had a header blocked as the hosts made a late push with a flurry of corners and crosses, but they capitulated in stoppage time.
First, Slovenia's frustration boiled over and Miso Brecko was shown a straight red card for a high challenge on Konoplyanka as he attempted to lead a counterattack.
Then, seven minutes into added time, Kevin Kampl lost possession to allow substitute Artem Kravets to race through unchallenged and square for Yarmolenko to slot home as Ukraine celebrated qualification.