In the dank basement of the Complutense University of Madrid’s forensics building, a young anthropologist named Amaya Maruri unlocked a door leading to a long, dim corridor.

“They sometimes film horror movies down here,” she said.

It’s easy to see why. Hanging from the walls are dozens of wax models of human bodies, and body parts, the skin infected with everything from ringworm to cutaneous tuberculosis to syphilis. These were out-of-control infections in the late 1800s, before there were cures for them.

The Olavide Museum contains hundreds of life-sized wax models of people infected with cutaneous and venereal diseases.Gerry Hadden/The World

But now, the Olavide Museum, Spain’s wax museum of dermatology that’s located in the facility, is set to close to open up more space for research. Once a treasured teaching tool for medical students, it was founded in the late 19th century, and contains hundreds of life-sized models of people infected with cutaneous and venereal diseases, from ringworm to syphilis.

“It’s the human stories behind the figures that get to me,” Maruri said. “Each figure has one. It helps you imagine how people lived and dealt with these illnesses.”

Long before photography, these graphic models helped students diagnose illnesses. And in recent years, the museum offered visitors a unique slice of this history.

The Olavide Museum has wax models of human bodies, and body parts — the skin infected with everything from ringworm to cutaneous tuberculosis to syphilis.Gerry Hadden/The World

Maruri turned on the lights in a small annex, illuminating a tiny wax figure of a girl curled in the fetal position on a white bed. Her naked body was carpeted in scaley yellow corpuscles.

A wax figure of an 8-year-old girl who worked as a nanny and got infected with a virulent form of ringworm called Favus.Gerry Hadden/The World

“This is of a girl who worked as a nanny,” Maruri said. “She was 8 years old. She got infected with a virulent form of ringworm called favus, due to poor hygiene and malnutrition.”

Maruri said the girl’s precise cause of death was a mystery. “But she probably just weakened and succumbed to hunger,” she explained. “The poor thing.”

The Olavide Museum displays lifelike diseases and was once a treasured teaching tool for medical students.Gerry Hadden/The World

Museum policy keeps the real names of the patients behind these models secret. But dermatologist and museum director Pablo Lazaro said it’s known that this little girl died in 1881, in a hospital that he described as more of a prison than a place of healing.

“Back then, hospitals were nothing like they are today,” he said. “They were for paupers. People with money didn’t go to them.”

Prostitutes, who were also poor, tended to take up lots of hospital beds in the late 19th century, because at the time, sexually transmitted infections — especially syphilis — were rampant.

“If a woman caught a sexually transmitted disease,” Lazaro said, “she was automatically incarcerated in the hospital.”

And what’s worse, he added, if she’d passed the disease on to a client, by law she was obligated to pay for his treatment.

The treatment at the time usually involved applying mercury and salts to the open sores, a practice that Lazaro said likely killed more people than it actually helped.

“It’s so horribly saddening to know that these diseases, which today can be treated with a simple prescription, would destroy lives,” he said.

As a teaching tool, Lazaro said, the wax figures’ value was that they helped students to identify diseases rather than cure them.

In the century since the museum opened, scientists have developed antibiotics and other medicines that can control and eradicate most of the diseases displayed there — another reason it shifted from a learning space for students to a museum for the general public.

Long before photography, the graphic wax models at the Olavide Museum have helped medical students diagnose illnesses.Gerry Hadden/The World

The medical school has given the museum until the end of August to move out. The school said it needs the space for looking forward through new research. For those who want to look back, they’ll now need to look somewhere else.