Today, some 1,500 fish species are bioluminescent—able to make their own light. They have luminous fishing lures coming out of their heads, glowing stripes on their flanks, bright goatees dangling from their chins, flashing headlamps beneath their eyes, or radiant bellies that cancel out their silhouettes to predators watching from below.

They evolved their glow in a variety of ways. Some came to generate it on their own, through chemical reactions within their own cells. Others formed partnerships with luminous bacteria, developing organs for housing these microscopic beacons.

Despite the obvious diversity of bioluminescent fish, no one knew exactly how often these animals evolved their self-mad light. “We thought it might be a dozen or so just by eyeballing a list,” says Matthew Davis from St. Cloud State University, “but the actual number was considerably higher.”

Together with John Sparks and Leo Smith, Davis built a family tree of ray-finned fish—the group that includes some 99 percent of fish species. By marking out the bioluminescent lineages, they report Wednesday in the journal PLOS ONE that these animals independently evolved their own light at least 27 times.

Illuminated Netdevil (Linophryne arborifera). Credit: Leo Smith

Of those 27 origins, 17 involve partnerships with glowing bacteria, which the fish took up from the surrounding water. Deep-sea anglerfishes housed the microbes in their back fins, which they transformed into complex lures. Ponyfishes kept the microbes in their throats, and controlled the light they produced by evolving muscular shutters and translucent windows.

But to Steven Haddock from the Monterery Bay Aquarium Research Institute, these partnerships are fundamentally different from cases where fish evolved their own intrinsic light. “If one species of bacteria evolves the ability to glow, then is eaten and proliferates in the guts of four different fishes, you could argue that bioluminescence evolved once in the bacterium,” he says. “To me, this is much less interesting than fishes that have their own chemical and genetic machinery.”

Those intrinsic light-producers have come to dominate the open oceans. There are around 420 species of dragonfishes, most of which have long bodies and nightmarish faces armed with sharp teeth. They include the bristlemouth, the most common back-boned animal on the planet; hundred of trillions of them lurk in the deep ocean. The lanternfishes are similarly prolific; the 250 or so species account for around 65 percent of the fish in the deep sea by weight. “They’re among the most abundant vertebrates on the planet in terms of mass, but the average person doesn’t know anything about them,” says Davis.

Silver Hatchetfish (Argyropelecus). Credit: Leo Smith

These groups aren’t just diverse, but unexpectedly so. In the relatively short time they’ve been around, they’ve accumulated far more species than is normal, and far more so than lineages that got together with glowing bacteria. Why?

Davis thinks it’s because they can exert greater control over their light. While ponyfishes have to rely on body parts that obscure the continuous glow of their microbes, lanternfishes and dragonfishes can turn their glows on or off, using nerves that feed into their light organs. That means they can flash and pulse. They can use their light not just to lure prey or hide from predators, but to communicate with each other.

Many scientists think that deep-sea fish could use bioluminescence as badges of identity, allowing them to recognises others of their own kind and to mate with partners of the right species. This might also explain why these fish became so extraordinarily diverse, in an open world with no obvious features like mountains or rivers to separate them.

“Biodiversity in the deep sea used to be viewed as somewhat of a paradox given the apparent lack of genetic barriers,” says Edie Widder from the Ocean Research and Conservation Association. Davis’s study hints at an answer. After evolving their own light, some fish may have effectively built luminous towers of Babel—different flashing dialects that split single communities into many factions. (Something similar may have happened among electric fish in the rivers of Africa.)

The same story applies to sharks. They’ve evolved bioluminescent at least twice, and these luminous species account for 12 percent of the 550 or so species of shark. And the groups whose light organs allow them to communicate with each other seem to be exceptionally diverse. As Julien Claes from the Catholic University of Louvain told me last year, “They’re some of the most successful groups of sharks. We discover new ones every couple of years.”

So forget great whites and makos, salmon and tuna, clownfish and angelfish. The most common and diverse fish in the world are the obscure ones that you probably haven’t heard about, swimming somewhere in the open ocean, basking in their own glow.