The oldest known all-purpose opening in the world is in a fossil display case in the Senckenberg Natural History Museum in Frankfurt, so close to the glass in which it is that you can “turn your face up like that,” said Jakob Vinther, paleontologist at the University of Bristol in England, held his hand an inch from his nose.

It belongs to a psittacosaurus, a beak-like, dog-sized, leaf-eating dinosaur that lived more than 100 million years ago. And it’s not technically an anus, although it worked like one at times. It’s a cesspool: a multifunctional socket named after the Latin word for “sewer system” through which some animals – including a menagerie of modern birds, reptiles, amphibians and even some mammals – empty, urinate, copulate and / or their offspring can extrude or eggs.

Now the opening of this opening, which was flattened during its fossilization, has been reconstructed into a three-dimensional model and published on Tuesday in the journal Current Biology. A close examination of the Psittacosaurus’ prehistoric privates suggests that the cesspool is somewhat crocodilian, but still differs between known subregions.

“Preserving soft tissues like this is always a rare gift,” said Armita Manafzadeh, a vertebrate paleontologist at Brown University who was not involved in the study.

The pristine Psittacosaurus fossil that served as the basis for the new 3D model was discovered in China decades ago. The animal’s body remained astonishingly intact over the eons, even retaining tatters of delicate, flaky skin and freckles of pigment.

When examining another study, Dr. Vinther was impressed by its cloaca – an anatomical area that is mysterious among dinosaurs due to the lack of viable tissue. Dr. Vinther realized that the Psittacosaurus’s rear body was just intact enough to compose a three-dimensional representation of the opening or opening of the cloaca.

He enlisted the help of Robert Nicholls, a paleo artist, to attempt the rebuilding. He also reached out to Diane Kelly, a University of Massachusetts Amherst biologist who specializes in genital evolution, to analyze the functional effects of her find.

Dr. Kelly spent a long afternoon in her facility’s natural history collections photographing preserved animal backs, from amphibians to reptiles to birds. Then she focused her lens on the rear ends of a friend’s live chickens. What she couldn’t find personally, she and her colleagues searched online until the team had gathered a comprehensive overview of the well-known sewer landscape.

(Noticeably, most mammals, including humans, are missing from the list. “We’re the weird ones out here,” said Ms. Manafzadeh. “We have weird extra holes.”)

Most of the openings look like nondescript slits – some horizontal, others vertical – or rounded holes, sometimes covered with wrinkled skin or a hint of scales, said Dr. Kelly. The Psittacosaurus variety could have been a little more adorned. The team’s reconstruction revealed that the opening was likely flanked by a pair of dark lips that were pinched in on one end and flared at the other, creating a kind of curtain-drawn curtain.

“In many ways, I’d say it’s unique,” said Dr. Vinther about the reconstructed vent. “Having a sewer isn’t just ‘Gee whiz, there’s a sewer here.’ It is different from any living group we know. “

Perhaps the closest analog is that of the crocodile, whose mouth is decorated with lips that pinch together at either end rather than fan out backwards, said Dr. Kelly. The similarities were so striking that the researchers suggested that the psittacosaurus, like crocodiles, might have odorous musk glands on either side of its mouth that emit a pungent perfume to attract mates.

The dark coloring of the lips against the background of the pale underbelly of the animal could also have served as a sexual beacon for other Psittacosaurus.

The researchers were unable to make firm conclusions about the inside of the cloaca. But if Psittacosaurus plumbing was more crocodiles than it wasn’t, it might be reasonable to believe that the animal’s cesspool also harbored a penis or clitoris, as most contemporary cesspools do. Among modern cloaca animals, only birds have shed the phallus as a sperm delivery system and have instead opted for a form of fornication called a cloaca kiss, in which the male strokes his vent against the female while forcefully ejaculating.

Dr. Kelly said she had a strong suspicion that most of the dinosaurs would have been the penis variety: “When you have internal fertilization, for the most part, you have a way to pocket it.”

But the Psittacosaurus penis, if it exists, is long gone, leaving little indication of the creature’s biological sex or how it may have copulated.

Patricia Brennan, an animal genitalia expert at Mount Holyoke College in Massachusetts who was not involved in the study, said a penile cloaca was very likely. But she also pointed out that a bulging rag found between the Psittacosaurus’ lips bears a resemblance to a structure that helps phallus-free male birds excessively expel large quantities of sperm.

“I’m 100 percent sure that at least some dinosaurs had penises,” said Dr. Brennan. But it is possible that Psittacosaurus removed the attachment.

The researchers also found a fossilized lump of feces in the Psittacosaurus fanny, a delightful reminder of the cessa’s versatility. Dr. Vinther said, “It’s very nice to find it right where it’s supposed to come out.”