Two wonderful finishes by Mateo Kovacic and Kai Havertz earned Chelsea victory away to Red Bull Salzburg in a breathless Champions League game and sent Graham Potter's side through to the last 16.
Midfielder Kovacic rifled in an unstoppable left-foot finish from 18 yards before Junior Adamu equalised after a wonderful pass by Maximilian Wober.
Salzburg keeper Philipp Kohn denied Pierre-Emerick Aubameyang four times while Jorginho had a header brilliantly cleared off the line by Adamu.
However, Havertz ensured Chelsea joined Premier League rivals Manchester City in the knockout stage with a sublime curling finish, before Thiago Silva was forced to clear off the line from Strahinja Pavlovic.
Chelsea have 10 points from five games in Group E, four ahead of second-placed Red Bull Salzburg with one match to go.
Potter's side will be confirmed as group winners - and therefore seeded for the last-16 draw on 7 November - if Dinamo Zagreb fail to beat AC Milan in Croatia later on Tuesday (20:00 BST).
From bottom of group to qualifying for knockout stage
Chelsea qualify for the next stage with one game to spare after ending Salzburg's incredible 40-match unbeaten home record in a pulsating encounter.
Kohn was outstanding for the hosts as he kept out Aubameyang's deflected header before denying the Gabon forward with his leg.
But there was little the keeper could do to prevent spectacular goals by Kovacic and Havertz which were celebrated wildly by Chelsea's 1,500 travelling fans in Austria.
There were impressive performances all over the pitch as Chelsea dug deep when they came under pressure in the second half after controlling the opening 45 minutes.
Chelsea started their Champions League campaign with Thomas Tuchel in charge and a 1-0 defeat in Croatia against Dinamo Zagreb on 6 September.
But his replacement Potter is now unbeaten in nine matches in charge as he gets ready to return to his former club Brighton on Saturday following one of the strongest performances of his Chelsea reign.
Chelsea's final group game is at home to Dinamo Zagreb on 2 November.
Their qualification for the next stage will allow Potter the option to rest key players for Zagreb before the heavyweight London derby at home to Arsenal on 6 November (12:00).
helpHow to play
Rate players out of 10 throughout or after the game. The rater will close 30 minutes after the final whistle.
Rating range key1 = Give it up10 = Pure perfection
FC Red Bull Salzburg
Squad number18Player nameKöhn
Squad number70Player nameDedic
Squad number95Player nameBernardo
Squad number31Player namePavlovic
Squad number39Player nameWöber
Squad number27Player nameGourna-Douath
Squad number13Player nameSeiwald
Squad number14Player nameKjærgaard
Squad number21Player nameSucic
Squad number77Player nameOkafor
Squad number9Player nameAdamu
Squad number8Player nameKameri
Squad number17Player nameUlmer
Squad number23Player nameSimic
Squad number30Player nameSesko
Chelsea
Squad number1Player nameArrizabalaga
Squad number14Player nameChalobah
Squad number6Player nameThiago Silva
Squad number32Player nameCucurella
Squad number10Player namePulisic
Squad number5Player nameJorginho
Squad number8Player nameKovacic
Squad number17Player nameSterling
Squad number23Player nameGallagher
Squad number29Player nameHavertz
Squad number9Player nameAubameyang
Squad number12Player nameLoftus-Cheek
Squad number18Player nameBroja
Squad number19Player nameMount
Squad number22Player nameZiyech
Squad number28Player nameAzpilicueta
Line-ups
RB Salzburg
Formation 4-1-2-1-2
18Köhn
70Dedic95Bernardo31Pavlovic39Wöber
27Gourna-Douath
13Seiwald14Kjærgaard
21Sucic
77Okafor9Adamu
18Köhn70Dedic95Bernardo31Pavlovic39WöberSubstituted forUlmerat 78'minutes27Gourna-Douath13Seiwald14Kjærgaard21SucicBooked at 47minsSubstituted forSeskoat 61'minutes77OkaforSubstituted forSimicat 78'minutes9AdamuSubstituted forKameriat 82'minutesSubstitutes
1Mantl2Van der Brempt4Piatkowski6Baidoo8Kameri17Ulmer23Simic24Diarra30Sesko33WalkeChelsea
Formation 3-4-1-2
1Arrizabalaga
14Chalobah6Thiago Silva32Cucurella
10Pulisic5Jorginho8Kovacic17Sterling
23Gallagher
29Havertz9Aubameyang
1ArrizabalagaBooked at 90mins14Chalobah6Thiago Silva32Cucurella10PulisicSubstituted forAzpilicuetaat 75'minutes5Jorginho8KovacicSubstituted forLoftus-Cheekat 68'minutes17SterlingSubstituted forMountat 88'minutes23GallagherBooked at 86minsSubstituted forZiyechat 88'minutes29Havertz9AubameyangSubstituted forBrojaat 75'minutesSubstitutes
12Loftus-Cheek13Bettinelli16Mendy18Broja19Mount20Zakaria21Chilwell22Ziyech28Azpilicueta30ChukwuemekaLive Text
Match ends, FC Red Bull Salzburg 1, Chelsea 2.
Second Half ends, FC Red Bull Salzburg 1, Chelsea 2.
César Azpilicueta (Chelsea) wins a free kick in the defensive half.
Foul by Maurits Kjærgaard (FC Red Bull Salzburg).
Attempt saved. Jorginho (Chelsea) right footed shot from outside the box is saved in the centre of the goal. Assisted by César Azpilicueta.
Attempt missed. Kai Havertz (Chelsea) left footed shot from the right side of the box misses to the left. Assisted by Mason Mount with a headed pass.
Kepa Arrizabalaga (Chelsea) is shown the yellow card.
Thiago Silva (Chelsea) wins a free kick in the defensive half.
Foul by Roko Simic (FC Red Bull Salzburg).
Foul by Hakim Ziyech (Chelsea).
Dijon Kameri (FC Red Bull Salzburg) wins a free kick in the defensive half.
Attempt saved. Dijon Kameri (FC Red Bull Salzburg) right footed shot from outside the box is saved in the bottom right corner.
Attempt blocked. Bernardo (FC Red Bull Salzburg) header from the centre of the box is blocked. Assisted by Maurits Kjærgaard with a cross.
Corner, FC Red Bull Salzburg. Conceded by Trevoh Chalobah.
Corner, FC Red Bull Salzburg. Conceded by Ruben Loftus-Cheek.
Attempt blocked. Amar Dedic (FC Red Bull Salzburg) left footed shot from the right side of the box is blocked. Assisted by Benjamin Sesko.
Substitution, Chelsea. Hakim Ziyech replaces Conor Gallagher.
Substitution, Chelsea. Mason Mount replaces Raheem Sterling.
Attempt missed. Lucas Gourna-Douath (FC Red Bull Salzburg) left footed shot from the left side of the box is too high following a corner.
Corner, FC Red Bull Salzburg. Conceded by Marc Cucurella.