Sometimes in the woods I come across a swarm of butterflies hovering over a patch of earth. What’s going on?

The behavior is called mud puddling, or just puddling, and is often seen in butterflies, a few moths and other insects searching for moisture, salt and other nutrients.

It’s not just damp patches of soil that draw butterflies. Some are attracted by wet sand, dung or carrion. Creating appropriate puddles is recommended as a way to lure attractive species to butterfly gardens.

In some species, males may hover over a sodium-rich slough and repeatedly take up liquid, voiding it after absorbing the valuable salt. Salt is otherwise scarce in a diet of plants and nectar.

It is believed that the mineral may play a key role in mating and reproduction. Often the male transfers the salt to the female upon mating, to be incorporated into the eggs. The transfer improves both mating success and egg survival.