Willian scored his seventh goal of the season as Chelsea beat Porto 2-0 at Stamford Bridge to top Champions League Group G.
The Blues, toiling domestically, had some good fortune in the 12th minute when Iker Casillas saved Diego Costa’s shot only for 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, Jose 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 at least.
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.
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.