The study, conducted by biologists at Sweden’s Lund University, was published in the journal Current Biology this week, BBC News reported.

"Even on clear, moonless nights, many dung beetles still manage to orientate along straight paths," Marie Dacke, a coauthor of the study, said in a statement, according to NBC News. "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."

“This is a complicated navigational feat—it’s quite impressive for an animal that size,” study coauthor Eric Warrant told National Geographic.

Previously, it was thought only birds, humans and seals used the stars for orientation, NBC News reported.

Navigating a straight path is important to dung beetles, who put a lot of energy into gathering dung into little balls and rolling them away to a safe place where they can be buried and dug up later to feed to their offspring, NBC News reported.

A circular path will bring a dung ball back to the dung pile, where it can be stolen by other dung beetles, according to NBC News.

It’s possible that other insects are looking to the heavens for guidance, Dacke told BBC News. “I think night-flying moths and night-flying locusts could benefit from using a star compass similar to the one that the dung beetles are using," she said.