Torrential rains have triggered flash floods and landslides on the Indonesian island of Sumatra, killing at least 22 people – mostly children at a school, and leaving 15 others missing, officials said.

A flash flood with mud and debris from landslides struck Mandailing Natal district in North Sumatra province and smashed an Islamic school in Muara Saladi village, where 21 children were swept away on Friday afternoon, said local police chief Irsan Sinuhaji.

He said rescuers retrieved the bodies of 11 children from mud and rubble hours later.

The National Disaster Mitigation Agency’s spokesman, Sutopo Purwo Nugroho, said rescuers were searching for 10 other children still missing.

A video obtained by The Associated Press showed relatives crying besides their loved ones at a health clinic where the bodies of the children were lying, covered with blankets.

Mr Nugroho said two bodies were found early on Saturday from a car washed away by floods in Mandailing Natal, where 17 houses collapsed and five were swept away.

Hundreds of other homes were flooded up to two metres high, while landslides occurred in eight areas of the region.

Four villagers were killed after landslides hit 29 houses and flooded about 100 buildings in neighboring Sibolga district, Mr Nugroho said.

He said flash floods also smashed several villages in West Sumatra province’s Tanah Datar district, killing four people, including two children, and leaving three missing.

Landslides and flooding in West Pasaman district killed a villager and left two missing after 500 houses flooded and three bridges collapsed.

Both North and West Sumatra provinces declared a week-long emergency relief period as hundreds of terrified survivors fled their hillside homes to safer ground, fearing more of the mountainside would collapse under continuing rain, Mr Nugroho said, adding that dozens of injured people were rushed to nearby hospitals and clinics.

Seasonal downpours cause frequent landslides and floods each year in Indonesia, a chain of 17,000 islands where millions of people live in mountainous areas or near fertile flood plains.