South African striker Benni McCarthy threw Porto's Champions League hopes a lifeline on Wednesday when he earned the holders a 1-0 win at CSKA Moscow.
Last season's surprise European champions have struggled to hit top form in the competition this campaign and a defeat at Moscow's Lokomotiv stadium would have ended their title defence.
Two incidents were decisive for Porto's first victory in their five Group H games to date -- McCarthy's 28th minute header and a 35th minute penalty that CSKA defender Sergei Ignashevich ballooned over the bar.
Victory in icy conditions in Moscow moved Porto from bottom to third place in the group on five points after Paris St Germain drew 0-0 at already-qualified Chelsea.
Chelsea are top on 13 points, followed by PSG and Porto on five points, with the French side just in front due to better head-to-head results. CSKA are bottom on four points.
To qualify, Porto now need to get a better result at home to Chelsea, coached by the Portuguese club's former boss Jose Mourinho, than PSG manage at home to CSKA on December 7.
Although they had much of the early pressure, forcing two good saves from Porto reserve keeper Nuno Espirito Santo, CSKA never seemed to recover from the missed penalty -- awarded after Ignashevich was brought down by Porto's Costinha.
It was CSKA's second penalty miss in their last two Champions League matches. Brazilian striker Vagner Love sent a penalty high over the bar in a 1-0 defeat by Chelsea three weeks ago at the same stadium.
"Our main mistake was to let through strong counter-attacks and one of those ended up in a goal for our opponents," CSKA captain Sergei Semak told NTV television after the game.
Porto coach Victor Fernandez confirmed he had told players in his half-time talk to defend hard and counter attack.
"We played in difficult conditions and we came through," he told reporters after the game, played on a pitch whose green turf was peppered with white frost. "Porto are strong and stable team."
With temperatures in the Russian capital dropping below minus 8 degrees Celsius, players donned leggings and gloves for a match that officials had earlier considered cancelling because of the icy conditions.
CSKA coach Valery Gazzayev said that although the result was disappointing, there was still all to play for in his team's final group match against PSG next month.
He said no one should criticise Russian international Ignashevich for putting his penalty into the stand.
"You can't blame him because many stars don't score them," he told reporters. "The team played to win today. It seemed that we were closer to scoring than our opponents -- we had more opportunities but Porto had more experience."
(Additional reporting by Mikhail Kiselyov)