FK Viktoria Plzeň gave coach Pavel Vrba a 48th birthday to remember as substitute Michal Ďuriš struck three minutes into added time to earn a 2-2 draw with AC Milan.
Milan arrived in Prague assured of second in Group H, and though fortunate not to be behind at the break, they slipped into the groove two minutes after the restart, going 2-0 up in the space of 60 scintillating seconds through Pato and Robinho.
Plzeň, though, revived hope through David Bystroň's 89th-minute goal before Ďuriš's dramatic strike earned the Czech champions a deserved point. They will be in the UEFA Europa League round of 32 draw on 16 December after finishing third in the section, three points ahead of FC BATE Borisov.
Vrba had fallen off his chair before his pre-match press conference, and his team had him out of his perch in the dugout with the most positive of starts. Their penetrative running and incisive passing posed Milan untold worry, though it was a wonderful Václav Pilař attempt, direct from Pavel Horváth's corner, that came closest to giving the hosts reward for their enterprise.
An ankle injury to Petr Jiráček that forced the Czech international off did little to diminish the hosts' elan, and a clever Horváth pass released Pilař behind the visiting back four only for his finishing skills to desert him. Marián Čišovský then connected cleanly with a corner only to head narrowly wide.
With their destiny decided before kick-off and their starting lineup shorn of nine players that lost to FC Barcelona on matchday five, it was unsurprising Milan were uncharacteristically disjointed. That, though, quickly changed after the interval. Massimo Ambrosini's diagonal ball was chested down by Robinho and Pato darted in ahead of Čišovský before rounding Marek Čech to put the visitors in front.
Within a minute, the pair repeated the feat. Čišovský's poor header was pounced upon, and a quick exchange of passes led to Robinho clipping the ball into an empty net. The remarkable shift in momentum could have been yet more brutal for Plzeň had a powerful Pato shot not ended with the ball ricocheting off a post.
Plzeň refound their composure, though, and Milan Petržela and Ďuriš both struck the woodwork before Bystroň reduced the deficit after unselfish play from Marek Bakoš. Then, with the last kick of the game, Ďuriš turned past Philippe Mexès to fire beyond Marco Amelia and spark wild celebrations from home players and fans.