Ghana qualified for its third straight FIFA World Cup, defeating Egypt on 7-3 aggregate with a 2-1 loss Tuesday, and Algeria earned Africa's last berth by beating Burkina Faso 1-0 for a 3-3 aggregate tie and a victory on away goals.

12 dead in Algeria

Algerian authorities say 12 people have died and 240 were injured during celebrations for Algeria's victory.

A government statement Wednesday said that five celebrating fans were killed when a van slid off the road into a ravine in the mountain town of Bejaia, east of Algiers, while four others died in the southern city of Biskra in a car accident. The remaining three died in other towns, the statement added without further details. 

All across Algeria people poured into the streets to celebrate their team's qualification for the cup, with young men driving their cars down the streets and honking their horns, despite heavy rain in the north Tuesday night. 

Ghana and Algeria joined Cameroon, Ivory Coast and Nigeria as Africa's representatives at June's World Cup in Brazil.

The win by Ghana 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. In the first international match in Cairo in two years, Kevin Prince-Boateng scored for Ghana on a counterattack in the 89th.

Egypt has not qualified for the World Cup since 1990. Ghana also eliminated Bradley's U.S. team in the second round of the 2010 tournament.

Algeria's Madjid Bougherra scored off a scramble in the 49th minute, putting his side ahead in the home-and-home, total-goals series following a 3-2 loss at Burkina Faso last month.

Burkina Faso, which lost to Nigeria in this year's African Cup of Nations final, hit the post in injury time. It has never qualified for the World Cup.