Jose Mourinho received a slice of luck and another reprieve as Chelsea advanced to the knockout stages of the Champions League as Group G winners with a 2-0 victory over his former club Porto.
The Blues, toiling domestically to put Mourinho's position in jeopardy, had some good fortune when Iker Casillas saved Diego Costa's shot and the ball ricocheted in off Ivan Marcano.
And when Willian, Chelsea's star player this season, doubled the lead seven minutes into the second half, Mourinho turned towards his son seated behind the dugout and punched the air in defiance.
Emotion was etched on his face and the home faithful sang the manager's name.
Blues owner Roman Abramovich applauded in his seat opposite in Stamford Bridge's West Stand, sharing in high fives with those around him.
Chelsea had avoided the ignominy and embarrassment of dropping into the Europa League. Mourinho's job was safe, for now.
Defeat and a Champions League exit could have forced Abramovich to act and wield the axe, but now the 2012 winners will play in the last 16 next spring.
Mourinho has work to do to remain in charge until then.
He was subject to the first managerial vote of confidence of Abramovich's 12-year ownership on October 5.
Fortunes have barely improved since and a solution must be found for their domestic troubles.
The Blues, who suffered an eighth loss in 15 Barclays Premier League matches last Saturday to Bournemouth, could be in the bottom three by the time they play at leaders Leicester on Monday.
It was much better from Chelsea, but not always convincing.
Costa hardly justified his recall, spurning some good opportunities.
The striker was also booked for petulant trip on Casillas and escaped punishment for kicking at Bruno Martins Indi when on the floor after being fouled by the Porto left-back.
Porto had never won in England in 15 previous matches, but had lost only once in 19 prior matches this season.
That defeat to Dynamo Kiev left the group wide open and Porto had to repeat their September win over Chelsea to go through.
The visitors began well, with Thibaut Courtois called upon to stop Yacine Brahimi's rasping shot from the right.
Costa forced the opening goal after riding the challenge of Marcano to reach Eden Hazard's pass.
The Costa of last season might have beaten Casillas with the shot, but instead it was blocked, only to rebound off Marcano and over the line.
The additional goal-line official awarded the goal despite Maicon's desperate dive.
Costa was roughed up by Porto, but not without reason as he mindlessly tripped Casillas after his Spain team-mate had gathered the ball.
Oscar was also tripped by Costa, as the pair got in each other's way when going into the box.
Oscar may have fallen over a stray Marcano foot, but Costa's presence distracted from the possibility of a penalty.
An Oscar strike deflected wickedly wide and Costa shot wide across goal, while Nemanja Matic was shown a yellow card which rules him out of Chelsea's next European match.
Casillas saved from Willian, who beat the Porto goalkeeper soon afterwards.
Hazard played in the Brazilian, who took one touch before finishing emphatically into the bottom corner.
Chelsea could have had more and Brahimi twice went close. Costa lost out in a shoulder-to-shoulder duel with Danilo before taking a heavy touch when played through soon afterwards.
And Hazard hit the post late on and is now without a goal in 26 Chelsea games.
Mourinho and Chelsea will learn who they face in the round of 16 in the Champions League draw on Monday, Dec. 14.