Leicester City sealed qualification to the knockout round of the UEFA Europa League with a dramatic 3-3 draw with SC Braga in Portugal.
The Portuguese team stormed into an early lead when Al Musrati swiped the ball past Kasper Schmeichel, only for Harvey Barnes to cancel it out five minutes later.
Paulinho restored the hosts' lead with a neat strike in an impressive first-half performance by the Liga NOS side.
Brendan Rodgers opted to rely on Jamie Vardy, James Maddison, Welsey Fofana and Youri Tielemans in the second half to salvage a point, and they did just that.
Luke Thomas scored his first senior goal for the club at only 19-years-old with 10 minutes to go, before Fransergio looked like he had won the game with a sensational counter-attack.
However, with Zorya defeating AEK Athens in the other fixture in the group, Leicester sealed qualification to the knockout round and maintained their unbeaten record in Europe thanks to Vardy's last-gasp strike.
Story of the Match
Al Musrati scored his first goal for the club after only four minutes with a swift right-footed strike past Schmeichel after the makeshift Leicester defence struggled to clear the ball.
However, the Foxes were level minutes later when Barnes beat Matheus at his near post to notch in his fourth goal in 13 games so far this season.
Braga responded to Barnes' strike by dominating possession, posing a threat to Rodgers' side.
Their pressure paid off in the 24th minute when Paulinho netted his third goal of the Europa League this season.
A series of one-touch passes fed Ricardo Horta through, who rounded Schmeichel, before composing himself to square the ball for Paulinho to slip the ball under the helpless Schmeichel.
Cengiz Under squandered a huge chance to equalise almost immediately after, but Matheus was lucky to deny the Turkish winger before the rebound failed to be diverted into the net.
Paulinho nearly made it 3-1 for the home side before half-time, but Schmeichel managed to get down low to deny the Brazilian from point-blank range.
Unlike the first 45 minutes, the second half started with bother sides implementing a more cautious tempo.
On the hour mark, both Vardy and Maddison were introduced to the proceedings, with a point looking set to be enough to secure qualification.
However, it was Braga who came close to scoring when Paulinho peeled off Fofana, before having his header tipped over the bar by Schmeichel.
Jonny Evans, who headed into his own net in the 3-0 defeat at Liverpool on Sunday, should have equalised from Maddison's corner, but the Northern Irishman headed just wide.
Leicester finally grabbed the equaliser courtesy of academy graduate Thomas. The goal came from Maddison's brilliant piece of skill before slashing the ball across goal for Thomas to equalise.
Braga thought they had won the game in the 90th minute through Fransergio after an excellent counter-attack from the home side.
However, the die-hard attitude of the Foxes was on display as Vardy was on the end of Marc Albrighton's cross to make it 3-3 and guarantee European football for the English side pass the group stage.
Jamie Vardy is key
The English striker was introduced to the tasty contest just after 60 minutes and enjoyed himself in Portugal.
With runs behind the defence, dropping deep and often finding himself out wide, Vardy's part in the result will please Rodgers going forward.
Despite falling behind in extra time, Vardy notched up when needed to save Leicester and seal the important qualification.
Should Leicester persist with a back three?
Just like they did on Sunday at Anfield, Leicester were easily beaten down the channels, with space left by the forward runs by the wing-backs.
Braga's third goal came from a similar pattern and it will be something Rodgers and other managers' would have noticed going into the future.
It is still uncertain on what formation the Foxes boss prefers, but if the back three is to remain, the holes left open will need to be corrected if there is to be any success.