Guimaraes :Portugal rescued an unconvincing World Cup 2010 qualifying campaign by securing a play-off place with a 4-0 victory over Malta on Wednesday.
Carlos Queiroz's side prevailed thanks to goals from Nani, Simao, Miguel and Edinho to finish second in Group 1 ahead of Sweden, who missed out on qualification despite beating Albania 4-1.
Talisman Cristiano Ronaldo was forced to miss Portugal's match with an ankle injury, but it was his replacement and former Manchester United team-mate Nani who broke the deadlock, rifling into the top corner after 14 minutes.
The former Sporting Lisbon winger saw another effort strike the post just after the half-hour mark before Simao settled the home side's nerves with a fine finish from the edge of the box on the stroke of half-time.
Miguel put Portugal further ahead in the second half before Edinho struck in the last minute, as the 2006 World Cup semi-finalists celebrated a result which means Sweden and their 69 million-euro Barcelona striker Zlatan Ibrahimovic will watch next summer's South African showpiece from home.
Portugal endured a terrible start to their bid to reach South Africa, winning just two of their first seven games and at one stage registering three back-to-back goalless draws.
Sweden's 1-0 defeat to Denmark on Saturday allowed them to move into second place, though, and the win over Malta means they join seven other sides in the draw for the two-legged European play-offs, which take place in November.
Olympiakos centre-back Olof Mellberg scored twice for Sweden in Solna, with Marcus Berg and Anders Svensson also on target for the hosts and Hamid Salihi netting a consolation for Albania.
Denmark's victory over Sweden at the weekend meant they were already assured of qualification as group winners although they rounded off their campaign with a 1-0 defeat to Hungary in Copenhagen.