A fire swept through a bar in the northern French city of Rouen overnight, killing 13 people and injuring six, after a birthday cake with candles and sparklers fell to the floor and set the carpet ablaze, police

said.

The fire broke out in the basement of the popular Cuba Libre bar and quickly engulfed the room where some 20 people were celebrating, filling it with thick black smoke and poisonous fumes, a Rouen police officer told Reuters.

The fire broke out in the Cuba Libre bar. (Matthieu Alexandre/AFP/Getty Images) "A large number of those who died were killed by the fire, others were overcome by the toxic fumes," the officer said.

Most of those who died were young people, between the ages of 18 and 25.

One of the injured suffered burns to nearly 90 per cent of the body and was in a critical condition, the officer added.

There are unconfirmed reports the polystyrene ceiling caught fire, releasing deadly gases, which poisoned and suffocated the victims.

France's interior ministry said a judicial investigation was under way into the fire, which Rouen Mayor Yvon Robert described as "totally accidental."

That allayed initial public concerns that it could have been a terrorist attack in a city that this week buried a priest who was knifed to death by Islamists in his church. Rouen is not far from the city of Saint-Etienne-du-Rouvray where on July 26 two men burst into a Catholic church during a service, forced Rev. Jacques Hamel to his knees and slit his throat.

Stunned onlookers stared at the bar's blown out windows and blackened interior on Saturday morning.

"All of a sudden, everything blew," said Valerie Fouquet, who was outside on the terrace of the bar at the time.

"We saw the smoke and we saw the flames, the chairs flew up, the window exploded."

More than 50 firefighters tackled the blaze, the interior ministry said.