Jamie Vardy scored a last-gasp goal amid a dramatic finale as Leicester City clinched their place in the knockout stages of the UEFA Europa League in an enthralling 3-3 draw at Braga.
With AEK Athens losing to Zorya Luhansk in Group G's other game on Friday (AEDT), the Foxes needed a point to book their place in the last 32, and thought they had it when Luke Thomas scored his first senior goal in the 78th minute to make it 2-2.
Yet Braga, who led at half-time thanks to goals from Al Musrati and Paulinho either side of Harvey Barnes' equaliser, seemed to have snatched the win when substitute Fransergio slotted in on the counter.
It was not to be, with Leicester's talisman Vardy on hand to tuck home Marc Albrighton's cross in the final minute of stoppage time and claim a precious, progression-sealing draw.
Braga were ahead inside four minutes when, after Iuri Medeiros saw two efforts blocked, Musrati arrowed a thumping strike into the left-hand corner.
Leicester drew level with their first meaningful attack when Barnes lashed in from a tight angle, but Braga's lead was restored when Ricardo Horta skipped past Schmeichel before squaring for Paulinho to finish.
Cengiz Under squandered a swift chance to equalise and Leicester would have been made to pay if not for a fantastic double stop from Schmeichel to deny Paulinho and Horta.
Vardy's introduction after the hour sparked life into Leicester and – after Jonny Evans had sliced wide – the pressure told, with substitute James Maddison drilling in a cross from which Thomas nudged home.
With Zorya cruising in Athens, Leicester appeared to be through but, at the culmination of a counter-attack, Fransergio powered a finish over Schmeichel to seemingly put the Foxes' progression on hold.
Vardy, however, had other ideas and, after leading a charge down the left flank, kept his position to latch onto Albrighton's delivery and side-foot into a gaping goal.