Two people died in car accidents after Algeria's capital exploded in fireworks and horn-honking joy when the national football team qualified for the World Cup knockout stages for the first time.

As post-match celebrations continued into the early hours, young people honked horns and drove madly through the streets, resulting in car accidents that wounded 31 people across the country, according to police. Two young men died in separate crashes.

The centre of Algiers was packed with jubilant youths as soon as the match in Brazil ended in a 1-1 draw with Russia. That allowed Algeria to qualify for the round of 16, where they will meet Germany on Monday.

After Algeria's 4-2 upset win over South Korea last week, there were five deaths from car accidents, and one man died after having a heart attack when the second goal was scored.

Across the Mediterranean, celebrations by Algerians in former colonial ruler France were marred by clashes with police last night. French police said 74 people were detained around the country.

In a rare statement, Algeria's ailing president Abdelaziz Bouteflika hailed the team's "brilliant qualification".

"It is with great pride that warms our heart and the hearts of all Algerians as well as our supporters in the Arab, Muslim and African world, that we welcome your qualification to the second round," said the statement issued by his office.

People watched the matches on giant screens set up around the cities. In Algiers, as soon as the final whistle blew, the massive crowd outside the colonial-era post office erupted into cheers and fireworks until the air was blanketed in smoke.