A mob in Madagascar killed two Europeans suspected of mutilating and murdering a young boy at the country's main tourist resort, security forces said.

Residents on Nosy Be island went on the rampage after the missing eight-year-old was found dead with his genitals and tongue cut off, according to assistant gendarmerie commander Guy Bobin Randriamaro.

"The rioters launched a manhunt and killed the Europeans," Mr Randriamaro said from the capital Antananarivo.

Local police commissioner Honoya Tilahizandry said the pair "were killed and burnt on Ambatoloaka beach", a popular palm-fringed strand of white sand.

The two men were identified only as Sebastien and Roberto.

In Paris, the government said "two foreigners have died and we have confirmation that at least one of them is French."

While local officials said both men were French, witnesses said one may have been Italian.

The murders occurred after days of tension on the island. Residents marched on the paramilitary police station on Wednesday, convinced the boy's killer was being held there.

Security forces say they fired shots in the air to disperse the crowd, but at least one person died and two others were wounded.

"The police tried to convince the mob that the alleged kidnapper was not at the station, but it was not enough to dissuade the crowd," national police spokesman Alexandre Sylvain Ranaivoson.

The mob also torched eight houses.

"They suspected the two foreigners of being behind the murder and trafficking human organs," said the gendarmerie's Randriamaro.

The two men "confessed under torture to having trafficked organs", he added.

A witness told local media the rioters only targeted the two men suspected of having ordered the boy's kidnapping, but left other foreigners alone.

The French consulate discouraged its nationals from visiting Nosy Be island "until order is restored, especially on the beaches."

Nosy Be, lying of the north west coast of Madagascar, is a magnet for Europeans and other tourists.