Sporting Lisbon held off a dramatic Manchester City fightback to edge the English side out of the Europa League on away goals after a 3-2 win for City levelled the scores 3-3 on aggregate.
City appeared in disarray as they fell 3-0 behind on aggregate following goals from Mathias Fernandez and Ricky van Wolfswinkel in the first half of the second leg of their last-16 tie.
Yet City were as good in the second period as they were bad in the first, hitting back through two Sergio Aguero goals and a Mario Balotelli penalty to fall agonisingly short of the quarter-finals. The pulsating finish, which saw goalkeeper Joe Hart's last-gasp header tipped agonisingly wide, had seemed highly unlikely at the break.
Sporting had no intention of sitting back on their first-leg advantage and the impressive Fernandez found space to shoot, but his effort was blocked by Stefan Savic and first-leg goalscorer Xandao headed wide from the resulting corner.
Fernandez opened the scoring with a stunning free-kick in the 33rd minute after a backtracking Balotelli clumsily bundled over Emiliano Insua. City boss Roberto Mancini appeared frustrated by Balotelli's actions - and exchanged words with his fellow Italian - but Fernandez took full advantage as he curled a fine shot around the wall which Hart could only palm in.
City were left needing four goals to progress after Sporting then grabbed their second of the night six minutes before the interval. Aleksandar Kolarov headed clear a free-kick but was then caught out of position as Marat Izmailov stole in and crossed low for Van Wolfswinkel to tap in.
City eventually pulled one back on the hour as Yaya Toure, fed by Micah Richards, picked out Aguero in the box, who took a touch and turned to fire past Rui Patricio.
City suddenly began to sense an unlikely comeback as Aguero won a penalty after being felled by Renato Neto. There was some debate as to whether the offence took place in the area, but Balotelli showed no sign of nerves with a cool penalty that left wrong-footed Patricio standing.
The game was truly on as Aguero remarkably put City ahead on the night - and level on aggregate - eight minutes from time. The Argentinian was left unmarked at the back post as a Kolarov corner made its way to him via the head of Savic and he blasted in.
Hart almost completed a sensational comeback as he went forward for a corner deep into injury time, but his header was tipped round the post by Patricio and there was no time to take the resulting corner.