Algeria claimed Africa's final place at the World Cup on away goals after beating Burkina Faso 1-0 in the second leg of their playoff on Tuesday and progressing with a 3-3 aggregate draw.

Algeria qualified for the finals in Brazil after a nerve-tingling finish at home to Burkina Faso, which hit the post in injury time to agonizingly miss the goal that would have taken the country to its first finals.

The North Africans qualified on away goals following a narrow 3-2 loss in Burkina Faso last month.

Algeria also prevented a clean sweep by West African teams in the qualifying competition. Nigeria, Ivory Coast and Cameroon qualified this weekend and Ghana progressed by beating Egypt 7-3 on aggregate earlier Tuesday. Algeria's qualification meant the same five countries that represented Africa at the 2010 World Cup in South Africa will go to Brazil next year.

Madjid Bougherra scrambled in the decisive goal four minutes after halftime in Blida to send Algeria to its fourth World Cup when a Burkinabe defender's attempted clearance rebounded off his head and into the net.

But Burkina Faso was within inches of stealing Africa's last World Cup spot when another rebound cannoned off the Algerian woodwork in the first minute of injury time. Inches inside the post and Burkina Faso would have followed up its surprise appearance in the African Cup final at the start of the year with a first ever trip to football's showcase.

Bougherra's 49th-minute goal gave coach Vahid Hallihodzic's team the World Cup place instead, and players and Hallihodzic were mobbed by fellow squad members and officials at full time. Players ran to the edge of the stands to celebrate with supporters in the packed stadium.

Algeria qualified for the World Cup in 1982 and 1986 and has now also reached back-to-back tournaments in 2010 and 2014. The country has never been past the first round at the World Cup.