Image copyright Getty Images Image caption Women put dressings on plague victims' wounds, a painting by Jacopo Robusti, 1549

In China's Hubei province, over a dozen cities are in lockdown in the hope of preventing further cases of the new Coronavirus. And Western countries are putting people returning from Wuhan, the city at the centre of the outbreak, into enforced isolation for up to two weeks.

Quarantine has long been used to prevent the spread of diseases.

The term itself comes from the first known example of the isolation method.

As the Black Death raged through Europe in the 14th century, Venice enforced a rule where ships had to anchor for 40 days before crew and passengers were allowed to come ashore. The waiting period was named "quarantino", which derives from the Italian for 40.

It's unclear where exactly the 40 days concept came from, said Mark Harrison, Professor of the History of Medicine at the University of Oxford. One possibility is that it was a biblical reference - the idea of spending 40 days and 40 nights in the wilderness as Jesus is said to have done.

Over time, the duration of quarantine has been shortened, but it remains key to limiting disease outbreaks across the globe.

In the UK, one of the most famous examples is the English village of Eyam's self-imposed quarantine during the bubonic plague. Between September and December 1665, 42 residents of the Derbyshire village died.

In June 1666, the newly appointed rector Willliam Mompesson decided the village should be quarantined.

Image copyright Science History Images / Alamy Stock Photo Image caption A 1656 engraving of Dr Schnabel of Rome, wearing protective clothing typical of the city's plague doctors at the time

He told his parishioners that the village must be enclosed with no-one allowed in, or out. He said the Earl of Devonshire had offered to send food and supplies if they agreed to be quarantined.

The rector told villagers he would do everything in his power to alleviate their suffering and remain with them.

That August, the village saw a peak of five or six deaths a day - but hardly anyone broke the cordon. Over time, the number of cases fell and by November the disease was gone. The lockdown had worked.

Image copyright Getty Images Image caption The village of Eyam, which enforced its own quarantine to protect other villages from the plague

Nowadays, most quarantines are imposed by governments or health bodies.

"When quarantine measures are introduced, they're not just based on medical calculations about whether or not they're going to be effective in stopping or slowing the advance of the infectious disease," said Mr Harrison.

"You take measures such as quarantine in order to meet expectations of other governments, but also to reassure your own population."

In San Francisco in 1900, Chinese immigrants were quarantined after a Chinese man was found dead in a hotel. It was later confirmed that he had died of the plague. Concerned, police officers strung rope and barbed wire around a section of Chinatown. Residents were not allowed to come in or out, and only police and health officials were allowed to cross the barrier.

During World War One, about 30,000 sex workers were quarantined amid fears about the number of rising sexually transmitted diseases. They were allowed to leave once it was confirmed they no longer had STDs.

Mr Harrison says the Sars epidemic of 2002-3 started a new era in infectious disease control.

During the outbreak, people who had been exposed to the virus were quarantined. The Chinese government threatened to execute or jail anyone who was found to breach quarantine rules and spread the contagion.

The disease reinforced lessons about the importance of working with other countries during a public health crisis.

When the syndrome spread from China to the Canadian city of Toronto, 44 people were killed and several hundred more infected.

About 7,000 people in Canada were placed in isolation to stop the spread of Sars.

Image copyright Getty Images Image caption A man sits behind a glass wall at Hanoi airport after returning from China during the Sars epidemic

"During the outbreak in 2003 when it started spreading to other countries, quarantine of various kinds was used extensively. The use of those measures of containment was credited with stopping the pandemic becoming worse than it could have been," said Mr Harrison.

"One of the lessons that people drew was a victory for old-style public health methods."

As China continues with the traditional method of quarantine to respond to the new coronavirus, the World Health Organisation (WHO) has praised the country for "taking extraordinary measures in the face of what is an extraordinary challenge".