Resilient species of coral can move to inhospitable areas and lay the foundations for new reefs, a study shows.

Scientists have discovered that these tough, mobile corals can create their own stable habitats, which act as a base upon which other species can attach and build reefs.

These hardy corals -- known as coralliths -- grow on pebbles or fragments of dead reefs, and they can survive being buffeted by waves and ocean currents.

The findings suggest many existing coral habitats -- particularly those in areas dominated by sand and rubble -- may have been created by coralliths.

The ability of coralliths to establish themselves in harsh environments mean they could play a key role in efforts to conserve at risk habitats, the team says.

Scientists from the Universities of Edinburgh, Glasgow and Heriot-Watt University made the discovery while carrying out fieldwork on coralliths in the tropical waters of the Maldives.

They identified a variety of structures -- from pea-sized balls to boulders several feet across -- in places where corals would not otherwise be able to settle and survive.

Coralliths have previously been identified in the fossil record, and evidence suggests that they have played a role in reef formation since at least the last Ice Age, researchers say.

The study is published in the journal Scientific Reports. It was funded by the Natural Environment Research Council.

Dr Sebastian Hennige, of the University of Edinburgh's School of GeoSciences, said: "For years we assumed that coral reefs, and small patches of coral in sandy habitats, needed stable ground on which to build. Now we know that corals can engineer their own stable environment from nothing, and create habitats for all sorts of species in places that we thought were unsuitable for reef formation."

Dr Heidi Burdett, of Heriot-Watt University's Lyell Centre, said "This discovery makes us question many things we have taken for granted in coral ecology, such as how some reefs formed in the first place, and whether coralliths may play a role in reef restoration following disasters."

Dr Nick Kamenos, of the University of Glasgow, said: "Importantly, not all coral species can form coralliths. Corallith-forming species are robust and resilient to environmental change and physical damage -- features that may give them an advantage in the future as climate change progresses. The ecological processes described by our hypothesis may therefore become even more prevalent in the future."