As human civilizations flourished, so did infectious diseases. Large numbers of people living in close proximity to each other and to animals, often with poor sanitation and nutrition, provided fertile breeding grounds for disease. And new overseas trading routes spread the novel infections far and wide, creating the first global pandemics.

Here’s how five of the world’s worst pandemics finally ended.

1. Plague of Justinian—No One Left to Die

Yersinia pestis
BSIP/Universal Images Group/Getty Images
Yersinia pestis, formerly pasteurella pestis, was the bacteria responsible for the plague. Here it's seen under optical microscopy X 1000.

Three of the deadliest pandemics in recorded history were caused by a single bacterium, Yersinia pestis, a fatal infection otherwise known as the plague.

The Plague of Justinian arrived in Constantinople, the capital of the Byzantine Empire, in 541 CE. It was carried over the Mediterranean Sea from Egypt, where plague-ridden fleas hitched a ride on black rats that snacked on grain.

The plague decimated Constantinople and spread like wildfire across Europe, Asia, North Africa and Arabia killing an estimated 30 to 50 million people, perhaps half of the world’s population.

“People had no real understanding of how to fight it other than trying to avoid sick people,” says Thomas Mockaitis, a history professor at DePaul University. “As to how the plague ended, the best guess is that the majority of people in a pandemic somehow survive, and those who survive have immunity.”

2. Black Death—The Invention of Quarantine

Gilles de Muisit's annals, The plague at Tournai, 1349, France, Brussels, Bibliothèque royale.
Photo12/Universal Images Group via Getty Images
The people of Tournai bury victims of the Black Death circa 1353.

The plague never really went away, and when it returned 800 years later, it killed with reckless abandon. The Black Death, which hit Europe in 1347, claimed an astonishing 25 million lives in just four years. Some historians estimate the disease led to even higher death tolls—up to 200 million. 

As for how to stop the disease, people still had no scientific understanding of contagion, says Mockaitis, but they knew that it had something to do with proximity. That’s why forward-thinking officials in the Venetian-controlled port city of Ragusa decided to keep newly arrived sailors in isolation until they could prove they weren’t sick.

At first, sailors were held on their ships for 30 days, which became known in Venetian law as a trentino. As time went on, the Venetians increased the forced isolation to 40 days or a quarantino, the origin of the word quarantine and the start of its practice in the Western world.

“That definitely had an effect,” says Mockaitis.

3. The Great Plague of London—Sealing Up the Sick

The Print Collector/Getty Images
Scenes in the streets of London during the Great Plague of 1665.

London never really caught a break after the Black Death. The plague resurfaced roughly every 10 years from 1348 to 1665—40 outbreaks in just over 300 years. And with each new plague epidemic, 20 percent of the men, women and children living in the British capital were killed.

By the early 1500s, England imposed the first laws to separate and isolate the sick. Homes stricken by plague were marked with a bale of hay strung to a pole outside. If you had infected family members, you had to carry a white pole when you went out in public. Cats and dogs were believed to carry the disease, so there was a wholesale massacre of hundreds of thousands of animals.

The Great Plague of 1665 was the last and one of the worst of the centuries-long outbreaks, killing 100,000 Londoners in just seven months. All public entertainment was banned and victims were forcibly shut into their homes to prevent the spread of the disease. Red crosses were painted on their doors along with a plea for forgiveness: “Lord have mercy upon us.”

As cruel as it was to shut up the sick in their homes and bury the dead in mass graves, it may have been the only way to bring the last great plague outbreak to an end.

4. Smallpox—A European Disease Ravages the New World

Smallpox was endemic to Europe, Asia and Arabia for centuries, a persistent menace that killed three out of ten people it infected and left the rest with pockmarked scars. But the death rate in the Old World paled in comparison to the devastation wrought on native populations in the New World when the smallpox virus arrived in the 15th century with the first European explorers.

The indigenous peoples of modern-day Mexico and the United States had zero natural immunity to smallpox and the virus cut them down by the tens of millions.

“There hasn’t been a kill off in human history to match what happened in the Americas—90 to 95 percent of the indigenous population wiped out over a century,” says Mockaitis. “Mexico goes from 11 million people pre-conquest to one million.”

Centuries later, smallpox became the first virus epidemic to be ended by a vaccine. In the late 18th century, a British doctor named Edward Jenner discovered that milkmaids infected with a milder virus called cowpox seemed immune to smallpox. Jenner famously inoculated his gardener’s 8-year-old son with cowpox and then exposed him to the smallpox virus with no ill effect.

“[T]he annihilation of the smallpox, the most dreadful scourge of the human species, must be the final result of this practice,” wrote Jenner in 1801.

And he was right. It took nearly two more centuries, but in 1980 the World Health Organization announced that smallpox had been completely eradicated from the face of the Earth.

5. Cholera—A Victory for Public Health Research

Hulton Archive/Getty Images
A satirical cartoon showing the River Thames and its offspring cholera, scrofula and diptheria, circa 1858.

In the early- to mid-19th century, cholera tore through England, killing tens of thousands. The prevailing scientific theory of the day said that the disease was spread by foul air known as a “miasma.” But a British doctor named John Snow suspected that the mysterious disease, which killed its victims within days of the first symptoms, lurked in London’s drinking water.

Snow acted like a scientific Sherlock Holmes, investigating hospital records and morgue reports to track the precise locations of deadly outbreaks. He created a geographic chart of cholera deaths over a 10-day period and found a cluster of 500 fatal infections surrounding the Broad Street pump, a popular city well for drinking water.

“As soon as I became acquainted with the situation and extent of this irruption (sic) of cholera, I suspected some contamination of the water of the much-frequented street-pump in Broad Street,” wrote Snow.

With dogged effort, Snow convinced local officials to remove the pump handle on the Broad Street drinking well, rendering it unusable, and like magic, the infections dried up. Snow’s work didn’t cure cholera overnight, but it eventually led to a global effort to improve urban sanitation and protect drinking water from contamination.

While cholera has largely been eradicated in developed countries, it’s still a persistent killer in third-world countries lacking adequate sewage treatment and access to clean drinking water.