Brazilian miner Vale declared force majeure on Friday on iron ore it was contracted to deliver on the domestic market after flooding on a key train line, and said it may extend the measure to cover exports.

The railway used by the world's top iron ore miner to transport the steel ingredient in the far north of the country shut on May 4 after flooding submerged the tracks in water of a depth of up to 1 meter (3.3 feet), it said in a statement.

Vale is taking every measure to reestablish the operation of the railway in the shortest time possible, but success depends on a reduction in rainfall in the region, it said in a second statement late on Friday afternoon.

If the weather conditions persist ... preventing the railway operating and the renewal of iron ore stocks at the port terminal in Ponta de Madeira, Sao Luis, the force majeure declaration will be extended to export contracts, it said.

Traffic was interrupted at kilometer 765 of the Ferro Carajas railway line, which serves the company's biggest mine in Para state, between the towns of Maraba and Itainopolis, after the Rio Vermelho river burst its banks on Monday.

Floods across the north and northeast have killed 38 and left around 800,000 homeless, local media reported. Some trucks carrying perishable produce to Sao Luis have had to discard their cargo after the waters closed roads and swept bridges away.

Pictures on Vale's website showed one train stopped in front of submerged tracks. It said trains could not run on tracks that were submerged in more than 7 cm (3 inches) of water. (Reporting by Peter Murphy)