(CNN) -- Real Madrid star Cristiano Ronaldo has been ruled out of Portugal's crucial final World Cup qualifier against Malta on Wednesday with an ankle injury and could be sidelined for up to a month.
Cristiano Ronaldo holds his ankle before going off in Portugal's win over Hungary.
Ronaldo played with the injury in Portugal's 3-0 home victory over Hungary on Saturday but lasted just 27 minutes before limping off.
Portugal, who have made a late charge in World Cup qualifying after looking set to make an ignominious exit, need to beat Malta in the home game to be sure of a place in the European playoffs.
The Portugal federation said they had allowed Ronaldo to leave the squad, while Spanish giants Real confirmed the bad news in a statement on Sunday.
"After a clinical examination and an MRI scan, it is confirmed the player has suffered a recurrence of his injury to his right ankle, a medial collateral sprain with inflammation in the bone," the club said.
"The estimated recovery time is three to four weeks."
Denmark have an unassailable lead in Group One after beating Scandinavian rivals Sweden 1-0 on Saturday.
The results almost certainly means the departure of Swedish coach Lars Lagerback, who said on Sunday that he will resign if his team fail to qualify for the World Cup finals in South Africa.
Roland Andersson, Lagerback's assistant, has also signaled he will go if results go against them on Wednesday.
"Roland and I will resign depending on the result, either after the World Cup in South Africa, after the playoffs or after the (last) qualifier against Albania," Lagerback said.
The Swedes are now third in the group, a point behind Portugal, and face Albania in their final match.
They must hope that Portugal, missing Ronaldo, slip up against Malta, while beating Albania.
Meanwhile, Ronaldo's former Manchester United teammate Wayne Rooney has been ruled out of England's final World Cup qualifier against Belarus with a calf strain.
Rooney picked up the injury in England's 1-0 defeat in the Ukraine. England have already qualified for the finals.