A.M. Herrera and M.J. Cohn / University of Florida A chicken penis under construction in a embryo.

In the animal kingdom, ducks and geese are famous for their extra-long penises. In fact, when extended, the usually coiled penis of the Argentine lake duck is longer than the bird itself. Most birds don't have such bragging rights, however: Males in 97 percent of bird species have tiny penises or lack them entirely. Instead, they shoot sperm into a female bird's body through an exit called a cloaca.

The absent bird penis is a head-scratcher for scientists who study animal reproduction. For animals in which eggs are fertilized inside the female body, sperm have a better chance of getting through if they're pipe-delivered within easy reach.

"Why lose an organ that seems so important to achieve this task?" Patricia Brennan, a researcher at the University of Massachusetts who studies the coiled duck penis, wrote to NBC News in an email.

Scientists have now identified the gene responsible for eliminating or reducing the bird penis, which begins to form in the embryo but disappears again before the bird hatches. The critical gene, called Bmp4, directs cells at the tip of the penis to die faster than they grow back. In birds with elaborate equipment — not just ducks, but emus and ostriches as well — Bmp4 is switched off, letting their penises grow to full size, as Martin Cohn and a team from the University of Florida explain in the Thursday issue of Current Biology.

The new study "now opens the possibility of exploring other instances of penis reduction in birds," Brennan, who was not involved with Cohn's research, explains.

A.M. Herrera and M.J. Cohn / University of Florida A scanning microscope image of the chick penis, colored red, before it shrinks.

Ducks have penises, but chickens do not. So Cohn and his team watched both chicken embryos and duck embryos grow before they hatched.

Scanning electron microscope images showed that the proto-penis in both species started out growing similarly, up until — in the case of the chicken — a silent kill order kicked in at the tip of the penis. After that, it began to shrink until it vanished almost to nothing. The team traced the directions back to the Bmp4 gene. When they turned off the gene in the embryonic chicks, penis growth continued. They also checked out emu embryos and found that they, like the ducks, lacked an active gene at the tip of the growing penis.

Cohn also examined an alligator embryo because, while reptiles and birds evolved from a common ancestor, reptiles wound up keeping their penises. Sure enough, the alligator lacked an active Bmp4 gene.

Mystery of the missing penis

Cohn sees penis loss in birds as "parallel" to the way snakes lose their limbs. Snakes start growing legs as embryos, but genetic factors kick in and inhibit their growth before they hatch. By slithering so successfully, legless snakes have found a niche. As to why evolution caused the penis in most birds to disappear: "This question still remains largely unresolved," Cohn writes.

Evolutionary biologists have proposed some tentative answers. William Eberhard, a staff scientist at the Smithsonian Tropical Research Institute, wrote to NBC News in an email that an elaborate penis in ducks and geese "might aid in copulation that occur[s] in the water." Another theory for uniquely shaped penises is to ensure creatures mated with members of their same species — the "lock and key" theory that mating would only be possible if the male and female bits fit together.

Others have suggested that the lost penis was a fallout of another adaptation. For example, it has been suggested that flying birds shed their penises as extra weight to make flight more efficient. But Brennan believes that is unlikely because "ducks have the large penises and they are some of the longest-distance migrants." Also, male birds that fly very little — like the moluccan scrubfowl and Australian brush turkey — seem to also have a tiny or nonexistent penis.

Brennan's favorite explanation is that it has to do with female choice. Mating behavior in many birds is forced. But when birds such as chickens mate via what's described as a "cloacal kiss," sperm can't enter a female unless she cooperates and turns her cloaca inside out. If she doesn't budge, fertilization won't happen.

Growing a penis is a developmentally error-prone business, a "process that goes wrong far too often in humans," Cohn explained, citing tube defects in 1 in 125 boys. But the penis is also among the most diverse organs found in vertebrates: Birds that do have penises inflate them not with blood, as humans do, but with lymph — the milky substance that that soaks our cells. Mammals such as bears, cats and sea lions have a bonelike structure to help stiffen theirs. And snakes? Well, snakes have two.

More on bizarre animal sex:

An earlier version of this story misidentified Patricia Brennan's position as a researcher at the University of Maryland. She is a researcher at the University of Massachusetts.

In addition to Martin Cohn, Ana Herrera, Simone Shuster and Clair Perriton also contributed to "Developmental Basis of Phallus Reduction during Bird Evolution" in the journal Current Biology.

Nidhi Subbaraman writes about science and technology. Follow her on Facebook, Twitter and Google+.