A woman and her 10-month-old baby, who were trapped in the rubble of a collapsed building for nearly two hours, have been rescued after sniffer dogs managed to locate them. However, the rescuers could not save the woman's husband.

The three-story apartment building collapsed in a suspected gas explosion in the French coastal city of Sanary-sur-Mer on Tuesday.

Rescue workers heard the cries of a baby amid the debris. They managed to locate the 10-month-old baby using sniffer dogs and dug their way through the pile of debris, fire department Capt. Aurelia Mannaioni told Associated Press.

"At certain moments, the child started crying," said Evence Richard, a top government official for southern France's Var region. "That allowed for an initial localization, which the dogs confirmed."

They saved the mother first and then the baby was pulled alive from the rubble. The child's father was found dead in the rubble alongside the child, regional fire department Chief Col. Eric Grohin said.

The infant and the mother were rushed to a hospital for treatment.

"It took more than two hours to get the baby out. He's been taken into care by emergency personnel and is doing fine," Grohin said, according to The Local. Fr. "We created a sort of gallery. We managed to bring out the child, who was conscious."

Officials believe two more people are trapped under the rubble and are trying to rescue them.

"Among the five people sought in the debris, three have been located, a woman and a baby were brought out conscious, and an unconscious man is currently being removed," fire officials said.

Officials have not confirmed what caused the fire but said there was a strong smell of gas at the scene when they arrived. Some people reported hearing a blast as far as five miles away, the outlet reported. Two adjacent buildings were also damaged.

Rescuers searched for survivors at a collapsed building in Mamuju city
Rescuers searched for survivors at a collapsed building | Representational Image AFP / Hariandi Hafid