Did bats invent fireflies?

When bats swoop through the night skies devouring insects, there’s one they know not to eat: fireflies.

Fireflies — also known as lightning bugs — contain toxic compounds, so bats avoid them. But how do bats know not to eat them, and how do they detect them on the fly? University of Florida firefly researcher Marc Branham teamed up with bat researchers at Boise State University to find out.

If you’re thinking that fireflies’ flashing lights have something to do with it, you’re right. But the whole story is even more interesting.

In the study, led by Boise State’s Jesse Barber, bats that had never encountered fireflies before quickly learned to not eat them. To figure out how fireflies advertised their distastefulness, the researchers tested potential cues one at a time. In one experiment, the researchers covered the light-emitting organs in the fireflies’ abdomens with paint (Testor’s Enamel in GI Black and Red Cherry, in case you’re wondering), and presented them to bats in a flight room. After multiple encounters, the bats did learn to avoid the darkened fireflies, but not as well as they did when the fireflies were flashing.

The bats learned much faster when they received both visual signals and acoustic sound than when they received only one of these signals. The flashing combined with the ultrasonic profile of the firefly in flight enabled bats to learn much more rapidly not to attempt to eat that insect.

So how do bats identify fireflies by their flight pattern? Fireflies beat their wings at a specific rate also used by other night-flying insects to advertise their distastefulness. The bats appear to be learning this rate and associating it with a very bad feeding experience, Branham says.

As a result, “Fireflies fly with the nonchalance of a chemically protected insect,” the authors write. They’re not in danger from bats, so they don’t need to dart around to avoid them.

That’s right: Fireflies have swagger. An even more remarkable lesson from the study: Pressure from hungry bats, not courtship communication, might have been the reason fireflies developed their signature flashes. Once developed to signal their distastefulness, the flashes could be then co-opted as courtship signals while still functioning as a bat deterrent.

“We predict that future evolutionary work will reveal that bioluminescence in beetles emerged with bats,” Branham told Boise State in a press release.