The North American monarch butterfly uses the Sun as well as Earth’s magnetic field as navigational tools for its famous long-distance migration, scientists said Tuesday.

The insects with their characteristic orange-and-black wings flutter thousands of kilometers each year from the United States and southern Canada to the Michoacan mountains in central Mexico, where they overwinter.

The butterflies, whose Latin name is Danaus plexippus, have long been known to use a type of solar compass in the brain.

Yet, curiously, they are also able to migrate when skies are heavily overcast, which suggested co-reliance on a magnetic compass.

Now, biologists from Massachusetts say they have found evidence for this, making the butterfly the first long-distance migratory insect thought to use magnetic navigation.

They placed monarchs in a flight simulator, which they surrounded with different artificial magnetic fields to test the insects’ directional sense.

Most headed equatorward in initial testing but turned north when the inclination angle of the magnetic field was reversed. The compass worked only in the presence of light at the upper edge of the visible light spectrum.

The butterflies’ antennae appeared to contain light-sensitive magnetosensors to make this all work, the team found.

The research, published in the journal Nature Communications, sees the monarch join a lengthening list of birds, reptiles, amphibians, turtles, and insects, including honeybees and termites, believed to use the magnetic field for navigation.

“Greater knowledge of the mechanisms underlying the fall migration may well aid in its preservation, currently threatened by climate change and by the continuing loss of milkweed (plant) and overwintering habitats.

“Another vulnerability to now consider is the potential disruption of the magnetic compass in monarchs by human-induced electromagnetic noise, which can apparently disrupt geomagnetic orientation in a migratory bird.”