If dragonflies are the insects of Japan’s day, then the mysterious, magical fireflies are its bugs of the night.

About now, firefly grubs will be emerging from rivers around the country. They’ve been living in the mud in larval form for the last year, and are ready to start the final, crucial part of their lives. They will pupate, and in June the chrysalis will split and the adult firefly — actually a beetle, because like all beetles they have a hard wing case while flies don’t — will emerge.

Fireflies have an unmistakable and quite beautiful feature: They generate their own light source through a process known as bioluminescence.

This phenomenon is actually a means of communication between male and female fireflies — but what no one knew until now was that, in Japan, it is the females who call the shots.

In North American species, a male advertises for females by flashing his light on and off. However, in the case of the Asian firefly (Luciola parvula) — the one found in Japan — it is the females who do the advertising.

It would be going too far to draw any parallels with human sexual behavior in North America and Japan, for instance, but it wouldn’t surprise me if someone does: Fireflies cause more buzz, much of it ill-informed, than most insects in Japan.

The two main species here, known as the Genji firefly and the Heike firefly, are named after two clans (aka Minamoto and Taira, respectively) who fought the Battle of Dannoura at sea off the southern tip of Honshu in 1185. The souls of the dead samurai were supposed to have transmuted into fireflies of the two different species. Not a bad place to go, I suppose, and quite samurai-like, as the adults live brief lives of only two weeks or so.

That they are deeply loved in Japan is nicely illustrated in a new study on firefly communication. The first author, Hideo Takatsu, is a member of the Aichi Fireflies Society — indeed, that’s the official affiliation given on the paper. His co-authors, more conventionally, are affiliated with Keio and Shizuoka universities.

Takatsu and colleagues suspected that female Heike fireflies signal to males, and set about building an electronic firefly to test the idea. By mimicking female flashing behavior with their fake firefly, Takatsu’s team showed that females specifically flash to attract males (Journal of Ethology, DOI: 10.1007/s10164-012-0332-2).

In other species of firefly, biologists know that females choose males on the basis of the signals the males send. This sets up opposing evolutionary pressures on the males. Natural selection acts to try to reduce the amount of light the males emit, as predators use the light to locate the insects and eat them. But sexual selection works in the other direction, to increase the light in order to attract more females, have more sex and sire more offspring.

Sexual selection, in this case, turns out to be more powerful, and signaling by phosphorescent light has evolved despite the dangers of predation.

Sexual selection usually acts strongly on males because they have more to gain from mating many times, whereas the benefits to females from multiple sexual partners are less obvious. In the famous example, it’s why male peacocks are colorful and elaborate but the females are drab.

So what’s happening here? For one thing, the study shows the diversity of behavior in these Asian insects. Females seem to be actively encouraging males to approach. They can even mate without the male signaling in response. “Spontaneous female flashes can lead to copulation without male flashes,” Takatsu and colleagues write.

Why would they do that? Could it be that they are more desperate to mate than other species of firefly?

One reason may be food, or more precisely, resources. Fireflies sip dewdrops of water from plants but don’t eat for the short time they are adults, relying on the stores of fat they laid down when they were larvae. (Gruesome aside: The larvae feed on mud snails, biting the snails and injecting digestive juices.)

Additionally, however, males offer some valuable victuals in the form of a nutritious protein capsule that they transfer along with their sperm when they mate. Females can turn the capsule into eggs, and increase their output by doing so.

So females have good reason to want to attract males. It doesn’t take much energy to produce a flash of light — it’s made by a chemical in the abdomen called luciferin which is stored in cells lined with a reflective layer of crystals. And though there is the risk of attracting predators, there is the potential reward of a rich male.

It’s no surprise that fireflies are so loved in Japan. There are firefly-watching events and, as we have seen, firefly societies. High school students sing “Hotaru no Hikari” (“Glow of a Firefly”) on graduation — to the tune of “Auld Lang Syne.”

The words to “Hotaru no Hikari” relate how ultradiligent students work by the light of the firefly, but no doubt the ephemeral nature of the animal — burning bright for a short time before dying — also appeals to emotional teenagers.

It certainly appeals to me. I once tried to learn a little of the language of the firefly — you could call it “fireflyese” — and shared a magical moment with some in the wilds of Ibaraki Prefecture. If come June you are lucky enough to see these most beguiling of insects, try “talking” to them with a small flashlight. Even without a dialogue, it’s a marvelous sight. How much more intriguing to imagine the evolutionary pressures and struggles — the romance and battling — behind the beautiful display.

And as is so often the case in stories like this, it ends with a warning. Overuse of pesticides and herbicides and fertilizers, together with habitat loss, has hit populations of fireflies hard. They need clean water and undisturbed streams to live and grow. See them while you can.

Rowan Hooper (@rowhoop on Twitter) is the News Editor of New Scientist magazine. The second volume of Natural Selections columns translated into Japanese is published by Shinchosha at ¥1,500. The title is “Hito wa Ima mo Shinka Shiteru (The Evolving Human).”