Nigerian authorities opened the gates at two swollen dams Friday in the country's rain-soaked north, sending a flood into a neighbouring state that has displaced two million people.

The torrent from the Challawa and Tiga dams swept through rural Jigawa state bordering Niger, said Umar Kyari, a spokesman for the state governor. Kyari said the rushing water affected about 5,000 villages in the dry region approaching the Sahara Desert, more than 1,400 kilometres from Lagos in Nigeria's Muslim-dominated north.

"They released water indiscriminately," Kyari said. It wasn't immediately clear whether residents received a warning or if anyone was injured or went missing in the flooding. Officials usually open dams seasonally in the region, but it appears far more water flowed out than residents expected.

Nigeria, an oil-rich country of 150 million in West Africa, typically has strong seasonal rains, but this year has seen particularly heavy rainfall in the north that already broke a dam and flowed over levees in another northern state.

State information commissioner Aminu Mohammed said local officials had begun putting displaced families in rural schoolhouses and other government buildings out of the reach of the floodwaters. However, Mohammed said the water had coursed across to the border with neighbouring Yobe state.

"The flood has washed away all the farms and houses," Mohammed said.

Typically, water released yearly from the dams flows into farm fields across the region known as the Sahel, a band of semiarid land stretching across Africa south of the Sahara. There, farmers use the water in the region's brief fertile season to grow corn, rice and a variety of vegetables. However, this year's rains have strained reservoirs and dams.

In Nigeria's northwest state of Sokoto, a dam failed, spilling into surrounding villages. Local newspapers reported as many as 40 people died.

Nigeria's rain problems come as neighbouring Niger faces what international aid experts say is the worst hunger crisis in its history following a prolonged drought and poor growing season last year. Niger, one of the poorest countries in Africa, now has more than seven million people — almost half of the population — suffering from a lack of food, officials say.