Cristiano Ronaldo scored a dazzling hat trick to lift Portugal into next year's World Cup at the expense of Zlatan Ibrahimovic's Sweden, and France came back in remarkable fashion to overtake Ukraine for a berth in the 32-nation field for next year's tournament in Brazil.
Iceland failed to become the least populous nation to reach soccer's top tournament, losing to Croatia on a thrilling final night of European qualifying.
Greece, Ghana and Algeria also earned berths, and Mexico took a 5-1 lead into the second leg of its playoff against New Zealand.
The final berth will be determined Wednesday night, when Uruguay defends a 5-0 advantage against Jordan. The draw is Dec. 6 at Bahia, Brazil.
Ronaldo's second international hat trick gave Portugal a 3-2 win at Stockholm and a 4-2 aggregate victory.
"It felt complicated for a moment after they scored," Ronaldo said. "We suffered a little bit and then, well, we scored two more goals."
Ronaldo, who scored in Portugal's 1-0 home win last Friday, scored off a pass Joao Moutinho in the 50th minute.
The 32-year-old Ibrahimovic tied the score in the 68th and put the hosts ahead 2-1 with a free kick three minutes later, leaving Sweden trailing on away goals. Goals by Ronaldo in the 77th and 79th minutes sealed the home-and-home, total-goals series for Portugal, which will be going to its fourth straight World Cup.
Sweden and Ibrahimovic will miss soccer's top tournament for the second straight time.
"Of course I'm disappointed. I wanted to play the World Cup," Ibrahimovic said. "We did our best. Unfortunately, we played against a better team — better than us, no doubt."
It was the 26th professional hat trick for Ronaldo, who has 23 for Real Madrid and one for Manchester United. His first three-goal game for Portugal was Sept. 6 at Northern Ireland.
"It just hurts right now," Sweden coach Erik Hamren said. "It is a dream, an ambition that has died. It's hurting for everyone."
France overturned a two-goal deficit from the first leg and beat Ukraine 3-0 on goals by Mamadou Sakho and Karim Benzema followed by a 72nd-minute own goal by Oleg Gusev.
Les Bleus, the 1998 world champion, played with a man advantage after Yevhen Khacheridi was given a red card for fouling Franck Ribery in the 47th minute.
Sakho began the comeback in the 22nd minute with his first international goal, and Benzema tied the home-and-home, total-goals series in the 34th with his third goal in his last four matches for France.
France went ahead in Paris when Gusev, who entered in the 64th minute, turned in a cross under pressure from Sakho. Les Bleus qualified for their 10th straight major tournament.
"It's the magic of football. Four days ago we were bad, very bad," France coach Didier Deschamps said. "I've experienced some great moments but this one is special."
At Zagreb, Croatia won 2-0 following a 0-0 tie at Iceland last week. Dario Mandzukic scored in the 22nd minute, then was given a red card nine minutes later for a studs-up tackle against Johann Gudmundsson. Mandzukic's goal came after Ivan Rakitic's cross was deflected into the penalty area by Ivan Perisic.
Darijo Srna added a goal in the 47th for Croatia, which won the home-and-home, total-goals series 2-0 and qualified for its fourth World Cup since becoming an independent state in 1991.
Iceland has a population of about 320,000.
"Croatia deserved to win," Iceland defender Ragnar Sigurdsson said. "It was the better team, especially today, and there is no doubt it deserves to go to Brazil. We felt it might go better for us after Mandzukic was sent off, but we did not get any space on the pitch."
Greece reached its second straight World Cup and third overall, beating Romania on 4-2 aggregate with a 1-1 draw.
Kostas Mitroglou, who scored twice last Friday at Piraeus, gave Greece the lead in the 23rd minute. Romania tied the score in the 55th minute when a botched Greek clearance led to an own goal by Vassilis Torosidis.
In Cairo, Ghana qualified for its third straight World Cup, defeating Egypt on 7-3 aggregate with a 2-1 loss that knocked out the Pharaohs and American coach Bob Bradley. Trailing 6-1 from the first leg last month, Egypt took a 2-0 lead on goals by Amr Zaki in the 25th minute and Gedo in the 84th. Kevin Prince-Boateng scored for Ghana on a counterattack in the 89th.
Egypt has not qualified for the World Cup since 1990, and Bradley said he would leave if his team didn't qualify. Ghana also eliminated Bradley's U.S. team in the second round of the 2010 tournament.
Algeria earned Africa's last berth, beating Burkina Faso 1-0 for a 3-3 aggregate tie and a victory on away goals. Madjid Bougherra scored off a scramble in the 49th minute.
Marc Janko scored in the 33rd minute after lax defensive marking, giving Austria a 1-0 exhibition win over the United States in Vienna. Hungarian referee Istan Vad failed to allow a goal for the United States when Geoff Cameron's header off Michael Bradley's corner kick deflected off an arm of Marko Arnautovic and appeared to cross the goal line in the 17th minute before it was swatted away by goalkeeper Robert Almer.
Defending champion Spain endured a miserable return to the scene of its World Cup triumph in 2010, losing an exhibition 1-0 to South Africa at FNB Stadium, formerly known as Soccer City.
Per Mertesacker scored on a header off Toni Kroos' cross that gave Germany a 1-0 exhibition victory that sent England to consecutive home losses for the first time in 36 years. England, beaten 2-0 by Chile on Friday, had not lost consecutive matches at Wembley since defeats to Wales and Scotland in 1977.
Hulk and Robinho scored to lift Brazil to a 2-1 victory over Chile in a soccer friendly in Toronto, a game that was both part of World Cup preparations and a spirited match between two South American teams.
Hulk scored in the 14th minute, the goal coming after Oscar intercepted a pass out of Chile's backfield. Oscar sent a long cross to Hulk, who launched a left-footed shot past goalkeeper Claudio Bravo.
Robinho gave the Brazilians the lead in the 80th minute when he headed in a perfectly placed goalmouth cross from Maicon.
Eduardo Vargas scored Chile's goal in the 71st minute, taking a short pass from Jean Beausejour and launching a long shot that tucked just inside the left corner, catching Brazilian goalkeeper Julio Cesar flat-footed.