Group winners Chelsea lost their perfect Europa League record as they were held to a 2-2 draw by MOL Vidi in Hungary.
Everything was going perfectly for Maurizio Sarri's men, who had already wrapped up top spot in Group L, when Willian curled in a first-half free-kick to put them ahead (30).
But within two minutes, Ethan Ampadu's clumsy header into his own net from a corner provided a leveller for the hosts - and just the second goal Chelsea had conceded in the competition.
Two became three in the second half when Loic Nego's crisp volley from Giorgi Milanov's pinpoint left-wing cross whistled beyond Willy Caballero at his near post to put the hosts in front (56).
But Olivier Giroud proved an unlikely supplier of another set-piece goal, firing an excellent free-kick beyond Adam Kovacsik to level (75) and ensure Chelsea remain unbeaten in Europe this season.
Vidi knew they had to better BATE's result against PAOK to stand any chance of getting out of Group L, but they rarely looked capable of threatening Caballero's goal early on.
Instead Willian stepped up to fire in from 20 yards with Kovacsik's poor positioning leaving him unable to get across to save his free-kick, although he did not need to lament the error for long.
Marko Scepovic's flick-on from a corner fell at chest height for Ampadu and, under pressure, he nodded it into the back of his own net.
The hosts turned the game on its head 11 minutes after the restart, when Milanov's excellent delivery found Nego at the back post, and he connected sweetly with his volley to leave Caballero with little chance.
Giroud should have pulled Chelsea level when he turned Cesc Fabregas' pull-back over the bar but, moments later, he made up for that miss with an excellent left-foot free-kick right into the top corner for his fourth goal in four Europa League games this season.
Referee Aleksandar Stavrev was in danger of losing control late on as he failed to punish a number of late challenges, but at full-time it was Vidi who had lost control of their own fate - and with BATE's win in Greece, it is the Belarusian side who will join Chelsea in the last 32.
Man of the match - Olivier Giroud
Giroud was excellent from the bench and while free-kicks may not often be in his repertoire, he looked like a seasoned scorer with his fourth in as many European games this season.
He offered more of a threat than Alvaro Morata, who he replaced in first-half injury-time when the Spaniard hobbled off, and could have had another goal if he had turned in Fabregas' pull-back too.
Opta stats
- Chelsea are unbeaten in their last nine Europa League games (W8 D1), last suffering defeat in the competition against Ruben Kazan in the second leg of the 2012/13 quarter-finals.
- MOL Vidi are just the second side to score two goals against Chelsea in a Europa League game after Ruben Kazan back in April 2013.
- MOL Vidi have lost just two of their last seven home Europa League games (W3 D2).
- There were just 116 seconds between Willian's opener for Chelsea and Ethan Ampadu's own goal.
- Chelsea are the first side to score two direct free kick goals in a single Europa League game since Liverpool against Zenit St Petersburg back in February 2013.
- Olivier Giroud has scored four goals in his last three Europa League appearances for Chelsea.
- Since his Chelsea debut, Willian has scored 10 direct free kicks for the Blue's - six more than any other Chelsea player (Marcos Alonso - 4).
What's next?
Chelsea will travel to Brighton at 1.30pm on Sunday, fresh from ending Manchester City's unbeaten league record last weekend.