Substitute Nabil Ghilas struck the decisive goal four minutes from time as FC Porto came from 2-0 and 3-2 down to book a place in the UEFA Europa League round of 16.
Eintracht Frankfurt looked to have warded off a rousing Porto fightback as, having seen two diving headers from Eliaquim Mangala decimate their 2-0 lead on the night, Alexander Meier's second gave them a 5-4 aggregate advantage. But this remarkable tie had one final twist as Porto threw everything forward and, when Kevin Trapp could only parry Licá's shot, Ghilas was on hand to seal progress and a last-16 meeting with SSC Napoli.
Porto still had to combat the home side's late charge, but may wonder how it came to this. Having been 2-0 up and cruising in last week's round of 32 first leg before being held 2-2, Paulo Fonseca's men dominated the early stages in Germany. Jackson Martínez was finding space in and around the box even if his composure let him down. He was not the only one as Hector Herrera squandered a real opportunity when, unmarked if unsighted by a defender jumping ahead of him, he made a hash of a header three metres out.
Eintracht had drawn 0-0 with SV Werder Bremen on Sunday despite the visitors playing with ten men for nearly an hour, so their beautifully crafted opening goal on 37 minutes begged the question: how? Pirmin Schwegler got clear down the right, playing a one-two with the deft Tranquillo Barnetta, before crossing towards Meier, peeling away from his marker at the far post. His knockdown landed perfectly for Stefan Aigner to guide in.
The noise among the Eintracht support, already living up to Armin Veh's pre-match billing, became deafening. They found another octave when Meier doubled the lead, prodding in Barnetta's square pass, but within 19 minutes Mangala had silenced them with a pair of commanding near-post headers. The pendulum swung again when Meier volleyed in, yet Ghilas had the final word.