Metalist Kharkiv scored twice in the final 10 minutes to claim a 2-1 win and secure an unlikely place in the quarter-finals of the Europa League on away goals at Olympiacos.
Olympiacos had kept 10 consecutive clean sheets before this game but wilted in the closing stages as goals from Cristian Villagra and Marko Devic sent them crashing out.
The Greek champions had looked to be coasting when Ivan Marcano's first-half header added to their 1-0 advantage from the first leg.
But they imploded late on as Metalist, who could even afford a saved Sebastian Blanco 77th-minute penalty before their goals, somehow squeezed through to the next round.
Olympiacos had completely dominated the first hour and, after hitting the woodwork twice in the first half, should have been out of sight.
Kevin Miralles first rattled the frame of the goal after just four minutes when he got everything behind a 30-yard shot.
David Fuster, who scored the only goal of the first leg, then volleyed wide before the opener on 14 minutes.
Jose Holebas tricked past a couple of defenders down the left flank before curling a cross to the back post where Marcano outjumped his marker to power in a header.
Olympiacos could have had even more with Rafik Djebbour seeing a shot saved by the legs of Metalist goalkeeper Vladimir Disljenkovic before Vassilis Torosidis headed Mirallas' corner against a post.
The visitors somehow managed to remain in touch and it paid dividends when they finally rallied late on.
They had not tested Balazs Megyeri until the 64th minute, when he tipped away Taison's 12-yard shot, but suddenly they sparked into life.
Blanco hit a post from close range before the same player saw his penalty saved after Francois Modesto handled in the area.
Metalist could hardly have imagined that the miss would not cost them as they roared to victory in the closing stages.
Villagra pulled the first goal back on 81 minutes when he beat the onrushing Megyeri to Juan Manuel Torres' cross before heading the loose ball in from barely a yard.
Substitute Devic then scored the crucial winner from the same distance when Megyeri failed to come and claim Sosa's corner and, while he initially saved the first effort, Devic poked home with an improvised backheel finish.