Chelsea needed a late own goal to spare potential embarrassment against gutsy League Two side Shrewsbury and reach the League Cup quarter-finals.
The Blues struggled on a wet Greenhous Meadow Stadium pitch, but took the lead after the break when Didier Drogba swept in a half-volley.
Shrewsbury scored a deserved equaliser 13 minutes from time when substitute Andy Mangan stabbed in.
That joy was short-lived as Jermaine Grandison turned in Willian's cross.
It seemed extra time might be on the cards when Mangan, recently back from injury, poked in to send the home fans into raptures.
But just four minutes later, Micky Mellon's side were dealt a cruel blow as Grandison, who provided the assist for the goal, nodded into his own net under pressure from Drogba.
Chelsea, whose line-up contained Drogba, Oscar and Andre Schurrle, barely threatened a well-organised Shrewsbury defence during the first half.
However, Jose Mourinho's men improved markedly in the second period, and took the lead three minutes after the restart when Drogba latched on to Mohamed Salah's pass and slammed his shot past Jayson Leutwiler.