Chelsea 3-2 Shakhtar Donetsk
Victor Moses rescued Chelsea with an injury-time winner against Shakhtar Donetsk, just as the defending champions' grip on the Champions League appeared to be slipping.
Roberto Di Matteo's holders were outplayed for long spells by their impressive Ukrainian visitors, who beat the Blues 2-1 in the previous round of matches, and looked destined to have to settle for a draw before substitute Moses headed in Juan Mata's corner with seconds left.
Chelsea - without captain John Terry and injured Ashley Cole - were grateful for two errors from Shakhtar goalkeeper Andriy Pyatov as poor clearances played a huge part in first-half goals for Fernando Torres and Oscar.
Brazilian Willian equalised twice to leave Chelsea effectively facing the prospect of having to beat Juventus in Italy to keep their hopes of qualifying from Group E alive.
Razvan Rat also struck the post for Shakhtar, who deserved a point at the very least for some sparkling attacking play, but 21-year-old Moses, who was signed from Wigan for around £9m in the summer, snatched the win to leave Chelsea second in the group and in contention to reach the next round.
It was a night when Chelsea rode their luck but also deserve credit for pressing until that late dramatic twist. The performance mattered so much less than this crucial victory.
Di Matteo was not convinced Terry was fully match fit following his recent four-match ban - and his composure and resilience was missed in the face of Shakhtar's wonderful attacking variations.
Chelsea have talent of their own up front but it took some good fortune to give them an early lead. Torres just failed to get on the end of Oscar's cross but had better luck charging down Pyatov's attempted clearance, which bounced off the striker into the net.
Shakhtar's approach was full of ambition and it was rewarded with a ninth-minute equaliser when 27-year-old Brazilian midfielder Fernandinho, the game's outstanding performer, drove at the Chelsea defence and pulled back a cross for Willian to slide home.
The Ukrainians hardly needed a lift to their confidence, such was the quality of their approach play, but the manner in which they took the game to Chelsea will have concerned the home fans in Stamford Bridge.
A move that epitomised their best work came when an elegant link between Fernandinho and Luiz Adriano found Alex Teixeira, whose first time shot was inches away.
Shakhtar's weakness was goalkeeper Pyatov and he was at fault once more as Chelsea regained the lead against the run of play five minutes before the interval. His headed clearance fell straight to Oscar, who made a difficult task look deceptively easy with a composed and accurate finish from 40 yards with Pyatov stranded out of his ground.
Once more the visitors were unperturbed and were level again two minutes after the break. Fernandinho was again the orchestrator with a pass that sliced Chelsea's left side wide open, allowing Darijo Srna to cross for another clinical finish from Willian.
Chelsea were having to fight to stay in the game and had another narrow escape when Rat rattled the post from 20 yards with Cech beaten.
Chelsea managed to impose themselves as the game entered its last 20 minutes and Di Matteo was off his seat appealing for a penalty when Ramires tangled with Srna but Spanish referee Carlos Velasco Carballo was not interested.
Shakhtar were even pressing in search of a winner as stoppage time began, but left Stamford Bridge with heads down in disbelief at leaving empty-handed after Moses, on for Oscar, snatched the decisive goal.