This article originally appeared on The Conversation.

A century-old mystery about how ancient freshwater fishes breathe has finally been put to rest, thanks to a study published last week in Nature Communications by a team of ichthyologists and me.

The fishes in question—Polypterus and related species—have tiny holes in the top of their heads called spiracles, and we showed how a small valve opens a bony lid over these spiracles to allow air to be sucked in and pumped out each time the fish surfaces.

And strangely enough, those same holes allowing the fish to breathe were modified through evolution to become eustachian tubes, which enable us humans to hear—but more about that later.

Research into these fish has a fascinating history stretching all the way back to Napoleon’s crushing defeat by the British at Alexandria in 1801, when one of his appointed naturalists, Etienne Geoffroy Saint-Hilaire, had to make a hasty return to France.

Among his many specimens was a strange fish with fleshy limbs caught from the Nile River, which he described in 1802 as polypterus, meaning “many fins.”

Also called the reedfish or bichir, it is widely regarded as the most primitive living member of the true bony fishes (osteichthyes). This group includes some 30,000 living species, including many of the fishes like snapper and salmon we love to eat.

Saint-Hilaire’s discovery caused a bit of a stir throughout the scientific world as the fish was thought to be one of the extinct lobe-finned fishes, which are today represented by the coelacanths and air-breathing lungfishes.

Prehistoric lobe-finned fishes like Tiktaalik were anatomically very close to the earliest known tetrapods (four-legged animals), the first backboned critters to invade land some 360 million years ago.

Further intrepid expeditions set out in the late 1890s to find more specimens of this strange fish. Scientists thought that understanding its life history would reveal how fishes might have evolved into land animals.

Although British zoologist John Budgett failed on three expeditions to locate the fish, he was finally successful in 1903, but he died of black fever shortly after returning to England that same year.

Before his death Budgett wrote a short scientific paper that told how these fishes were able to breathe air in through spiracles on top of their heads, with mouths submerged, making a loud “sucking sound.”

A paper written by a French researcher in 1966 backed this up by observations from the field. Later research, published in 1989 by a team of well-respected scientists who observed the fish under laboratory conditions, disagreed, concluding that “these fish do not, as others have suggested, breathe through their spiracles.”

For the scientific world, this was the last definitive word about the fish and its purported ability to breathe through its head—until now.

The research upon which today’s paper was based was initiated by the late Jeff Graham, who spent his life dedicated to studying air-breathing fishes.

When he passed away in late 2012, Nick Wegner and his team completed the work. The results showed that under laboratory conditions, when the tank of fishes was behind a blind, Polypterus take in up to 93 percent of their breaths using the spiracles rather than the mouth.

When the blind was removed, the fish used the spiracles for only about 40 percent of their breathing due to stress. According to Wegner: “When we first saw Polypterus breathe air through its spiracles we knew we had solved a 100-year-old mystery. When we captured it on film, we knew we could prove it.”

Breathing through the spiracle gives the fish a big evolutionary advantage as they can surface to breathe while keeping their eyes underwater, wary for predators. It also means they are able to breathe when swimming in shallow water where it is difficult for them to raise their head above water.

But what does it mean for understanding our deep distant evolution? The new finds provide a method for how the very first prehistoric fishes were able to begin to breathe air. Breathing air is a requirement for fishes if they were to leave the water and invade land as tetrapods.

The oldest known bony fish fossils date back to 430 million years ago from China. These include heavily armored forms like Guiyu, which has spiracles on top of its head.

A 380-million-year-old fish from Western Australia called Gogonasus was unusual in having enormous spiracles on top of its head. It belonged to the group of fishes called tetrapodomorphs, widely regarded by scientists as the ancestral group from which the first tetrapods evolved.

When my team discovered the Gogonasus with these large spiracles in 2005, we guessed they might have had something to do with air-breathing capability, but we had no evidence to prove this.

The new research on Polypterus is the smoking gun that now supports the idea that fish such as Gogonasus were able to breathe in air through their large spiracles.

Furthermore, several other fish fossils of that age, like the famous Tiktaalik, also show large spiracles on top of their heads. The earliest known tetrapod fossils, like Ventastega, also show very large open spiracles on their heads. All of this points to the ability of these fishes and tetrapods to take in air from their spiracles as the first type of breathing.

Once the four-legged descendants of these lobed-finned fishes had invaded the land, the ability to breathe through their spiracles rapidly declined. They soon switched to regular breathing using their mouths and nostrils, as we do today.

The canal leading from the spiracle to the inside of the head soon developed another use. Out of water, amphibians had to develop new senses that worked better in air.

Transmitting vibrations through the air to the brain would become the next major use of the spiracle canal. Hearing in early amphibians developed from adapting the spiracles to become the tympanic membrane for transmitting sound to the brain through the stapes, one of our tiny inner ear bones.

Our three tiny inner ear bones also have a remarkable evolutionary history that demonstrates how close our human anatomy is to the ancient fishes.

Starting out as a long bone that braced the lower jaws of sharks and other early-jawed fishes, the hyomandibular bone in fishes eventually shrunk in size and became the stapes in amphibians, reptiles, and us mammals.

In fishes it braced the articulation of the lower and upper jaws, the quadrate and articular bones.

These bones also gradually deceased in size and became restricted to the inner ear and were renamed as the malleus and incus. Thus these three little bones that enable us to hear are derived from these three larger bones in the jaws of ancient fish.

If not for the bold evolutionary experiments of these prehistoric fishes breathing in air through the top of their heads, we might not have evolved such a keen sense of hearing.

Indeed, John Budgett would not have been able to hear the strange sucking sounds of the Polypterus when it surfaced on the Nile River to breathe.

So today, when you next listen to that exquisite piece of music, give a cheer for evolution and spare a thought for the ancient fossil fishes that have given you the evolutionary legacy of listening pleasure.