(CNN)"Quarantine" is a word used for the precautionary isolation period that those possibly exposed to the novel coronavirus must face.
The dark and complex history of quarantine goes back to the Middle Ages
Thousands of people around the world are being quarantined as governments scramble to keep the virus from spreading. In China, thousands were forced into mass quarantine centers. In Italy, entire cities and towns were put on lockdown, effectively putting an estimated 100,000 under quarantine.
In the United States, quarantines are in place for some first responders who helped infected patients at a Seattle-area nursing home, or attendees of a New York bar mitzvah.
But while the spreading quarantines might feel unprecedented, this is not the first time they've been used to stop the spread of a deadly virus.
The word, and the practice, has a dark and complex history that goes back to the Middle Ages.
The word "quarantine" itself is derived from the French word "quarantaine," which means "about 40," according to Merriam-Webster. The word was first used in English in 1617 to refer to the 40 days a ship suspected of carrying a contagious disease was held in isolation offshore.
But the first instance of the institutionalized practice of quarantine came much earlier, in the 14th century, according to the CDC.
The bubonic plague, or so-called Black Death, devastated Europe from 1347 to 1352, killing an estimated 20 million people.
When the plague started spreading in 1347 in Venice, Italy, ports started turning away ships suspected of coming from infected areas. By the following year, authorities in Venice became the first to formalize the protective action. They closed their ports to suspect ships and subjected travelers and legitimate ships to 40 days isolation, according to the Science Museum in London.
As the United States developed in the 18th century, protection against contagious diseases fell under local and state jurisdictions, according to the Centers for Disease Control and Prevention.
After a 1793 yellow fever epidemic struck Philadelphia and killed 5,000, the city built a quarantine station called the Lazaretto along the Delaware River that occupied 10 acres, according to PBS.
But as outbreaks of yellow fever continued, Congress took action and passed the National Quarantine Act in 1878.
The legislation didn't conflict with states' rights, but paved the way for the federal government's involvement in quarantine activities.
Local quarantine stations were slowly turned over to the federal government and the quarantine system was fully nationalized by 1921, according to the CDC.
In March 1900, Chick Gin, the Chinese owner of a lumberyard, died of bubonic plague in the Chinese quarter of San Francisco, according to PBS.
Authorities immediately cordoned off the 15-block neighborhood, quarantining about 25,000 Chinese residents and closing businesses owned by people who weren't white.
Later that year, a court ruled that the quarantine was racist and lifted it.
The judge declared that health officials acted with an "evil eye and an unequal hand," PBS said.
In Cape Town, South Africa, in 1901, an epidemic of bubonic plague forced almost all of the city's black African population into a quarantine camp.
"This camp and practice of eviction would become part of the blueprint for future forced removals and the model for South African racially segregated townships in the lead-up and during the era of apartheid," Alexandre White, an assistant professor of sociology and history of medicine at John Hopkins University, told CNN.
During World War I, federal officials learned a large percentage of their soldiers were infected with syphilis or gonorrhea, according to the History Channel.
Close to 20,000 women, most of them infected with venereal diseases, were incarcerated or detained without being formally charged with a crime, according to The New York Times.
Some were prostitutes, while others were "charity girls" who had sex in exchange for meals or entertainment.
They were surrounded by barbed wire and guards and often were forced to undergo humiliating medical procedures, the New York Times said.
Historian Allan Brandt called this effort "the most concerted attack on civil liberties in the name of public health in American history," according to PBS.
The U.S. Department of Health, Education and Welfare transferred quarantine responsibilities to the National Communicable Disease Center, which is now the US Centers for Disease Control and Prevention.
When the CDC took charge, there were quarantine stations at every port, international airport and major border crossing.
In the 1970s, the CDC cut the number of quarantine stations from 55 to 8 because infectious diseases were thought to be "a thing of the past," according to CDC. But following the September 11 terrorist attacks that sparked fears about bioterrorism, then the 2003 SARS outbreak, quarantine stations were increased to 20.
Quarantine is one of the most aggressive responses to an epidemic a government can take, according to White, the John Hopkins medical historian.
And while the practice may be effective at preventing an epidemic from spreading, history has suggested it's often the most marginalized groups that are unjustly targeted.
Today there is no official government quarantine of an entire Chinatown like there was 120 years ago. But amid the coronavirus outbreak, Chinese-owned businesses are