In the African desert, surface temperatures can often shoot up past 140 degrees Fahrenheit. If you were caught in such conditions, you might do just about anything to cool off – even if it meant dancing on top of a ball of poop.

Admittedly, dung beetles aren’t exactly as creeped-out by feces as we are, since excrement is the main staple of their diet. They even roll it up into spheres for a takeout meal! Now scientists say those balls of waste serve another purpose as well: They’re also transportable (and slightly fragrant) air conditioners.

In the latest issue of Current Biology, South African and Swedish researchers describe how dung balls double as "mobile thermal refuges."

"Like an air conditioning unit, the moist ball is cooled by evaporative cooling," lead author Jochen Smolka of Lund University in Sweden said in a statement Monday. "The beetles climb their cool balls whenever their front legs and their head overheat from pushing this huge dung ball across the hot South African sand."

Smolka and his colleagues stumbled onto the phenomenon by accident. They were observing beetles performing their "orientation dance," a little jig the insects perform atop their rolled-up dung balls that helps them get their bearings. The scientists noticed that they seemed to dance more in midday, when the heat was at its most scorching.

The researchers thought that the beetles may get the urge to dance on their dung balls when the temperature on their front legs increases. To test this hypothesis, they outfitted dung beetles with little silicone boots that insulated them from the heat. Booted beetles climbed their dung balls significantly less often than their barefoot brethren.

The authors think the ball-climbing behavior “may have evolved to protect the sensory organs on the legs and head, as well as the beetles’ brain, from temperature-related damage,” according to the paper.

Dung balls can help keep the beetles cool in three ways, according to the paper. The ball functions as an elevated platform above the hot sand. Thanks to evaporative cooling, a moist dung ball has a substantially more comfortable temperature of around 88 degrees Fahrenheit. The lower temperature may allow the ball to function as a heat sink that absorbs heat while the beetle is pushing and when it is dancing. And since the beetle is pushing the ball in front of itself, the cool dung is likely cooling the sand the beetle is about to step on.

"Evolution has an astonishing ability to make use of existing structures for new purposes—in this case using a food resource for thermoregulation,” Smolka said.

SOURCE: Smolka, et al. “Dung beetles use their dung ball as a mobile thermal refuge.” Current Biology 22: R863-R864, October 2012.