The humble dung beetle is the first insect known to navigate by the stars. Like sailors of old and Saharan nomads, it can orientate itself by watching the sky.

On clear nights, a myriad of stars shine over the deserts and savannahs of Africa where the dung beetle, or scarab, makes its home. While the beetle's compound eyes are probably too weak to see individual stars, it uses the light of the Milky Way to keep it on a straight course, scientists have found.

The beetles feed on animal dung, which they fashion into a ball and roll to a safe spot where it is less likely to be stolen. Rolling the ball in a straight line ensures they do not circle back to the dungheap, where other scarabs might have gathered.

Scientists wondered how they were able to do this in the dark. "Even on clear, moonless nights, many dung beetles still manage to orientate along straight paths," said Dr Marie Dacke from Lund University in Sweden. "This led us to suspect that the beetles exploit the starry sky for orientation - a feat that had, to our knowledge, never before been demonstrated in an insect."

Field experiments on a South African game reserve showed that the beetles were able to roll their dung balls along straight paths under starlit skies, but not in overcast conditions.

For the tests, the beetles were fitted with tiny cardboard caps to alter their field of vision. They were placed in a circular arena surrounded by a metre-high black cloth, making it impossible for them to see landmarks.

On moonless nights, it took much less time for the beetles to roll a dung ball from the centre of the arena to the edge when they were able to see the sky. When they could not see the sky above them, however, the time taken increased from 40 seconds to 124 seconds as they wandered aimlessly around.

The experiment was repeated in a Johannesburg planetarium, with similar results.

The beetles performed just as well when only the glow of the Milky Way was visible as they did under a full sky of stars.

Most stars would be too dim for the beetles' tiny compound eyes to see, said the researchers. While unable to pick out constellations, the scarabs could detect the light of the Milky Way arcing over their heads.

"This finding represents the first convincing demonstration for the use of the starry sky for orientation in insects and provides the first documented use of the Milky Way for orientation in the animal kingdom," the researchers wrote in the journal Current Biology.

Previously, only birds, seals and humans were known to navigate by the stars.

"Although this is the first description of an insect using the Milky Way for their orientation, this ability might turn out to be widespread in the animal kingdom," the scientists said.