Two people died in car accidents after Algeria’s capital, Algiers, exploded in fireworks and horn-honking joy after the national team qualified for the knockout stages of the World Cup for the first time. As the post-match celebrations continued into the early hours of Friday, 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 car crashes.

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

Across the Mediterranean, celebrations by Algerians in France were marred by clashes with police. French national police said on Friday that 74 people were detained around the country after overnight incidents.

In Marseille, youths climbed on signs and cars, waving Algerian flags in triumph.

Algiers was packed with jubilant youths as soon as the 1-1 draw with Russia ended in Brazil on Thursday. That meant Algeria qualified for the last 16, where they will meet Germany on Monday.

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 late Thursday.

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 iconic colonial post office erupted into cheers and set off fireworks until the air was blanketed in smoke.