In Kentucky, 24 people who tested positive for the novel coronavirus have voluntarily cooperated with orders to self-quarantine to prevent the spread of the disease to others.

But one 53-year-old man in Nelson County refused to follow medical advice. He recently checked himself out of a University of Louisville hospital against his doctors’ advice and told the local health department he would not comply with an order to isolate himself from others.

On Saturday, the Nelson County Sheriff’s Office posted armed deputies outside the man’s house over the weekend to enforce the quarantine.

“It’s a step I hoped I’d never have to take, but we can’t allow one person who we know has the virus to refuse to protect their neighbors,” Kentucky Gov. Andy Beshear (D), who worked with the sheriff’s office and a judge to order a forced quarantine, told the Lexington Herald-Leader.

Although the Louisville Courier-Journal reported that the infected man, who has not been identified, later agreed to stay in his home, Nelson County Sheriff Ramon Pineiroa said Monday he would keep officers stationed at his house in case he changed his mind. The man is one of 25 Kentucky residents to test positive for coronavirus, according to the latest numbers released by Beshear’s office Monday night.

Across the globe, the coronavirus is forcing millions of people into isolation at the behest of public health experts exhorting social distancing. But not everyone has been cooperative.

Over the weekend, thousands of people participated in pub crawls across crowded entertainment corridors in major cities such as New Orleans, Nashville and Miami Beach, bucking local restrictions on large gatherings and public health warnings. On Monday, most Florida beaches were still packed with sunbathers and spring breakers. And early Tuesday morning, Twitter trends reflected widespread frustration with people going out in hashtags including #HowToKeepPeopleHome.

Even people who have symptoms consistent with covid-19 are socializing against the advice of their doctors and public health experts.

In late February, a New Hampshire health-care worker, the first man in the state to test positive for coronavirus, was told to self-quarantine while he waited for his results. Instead of hunkering down, he showed up to a mixer for Dartmouth College students and doctors, the New York Times reported.

Earlier this month, a father in Missouri took his daughter to a school dance even though he had another child home sick, waiting on test results for the coronavirus that eventually came back positive. Local health department officials said he broke a quarantine that applied to the whole family, but the man’s attorney said the quarantine applied only to the sick daughter at the time.

Just last week, a man walked away from an emergency quarantine center at a motel in Kent, Wash., a hot spot for covid-19. He was waiting for test results that would determine whether he had contracted the virus, the Seattle Times reported. Those tests came back negative, but the quarantine breach raised red flags for local officials in charge of testing for the virus and enforcing isolation orders.

The stubborn resistance to quarantine is not a uniquely American problem. Public health officials in New Zealand, Australia and the United Kingdom have threatened hefty fines for people who break mandated quarantines. Early Tuesday, authorities in New Zealand decided to deport two tourists from Southeast Asia who defied the country’s mandatory two-week quarantine that applies to most visitors coming into the nation from abroad.

In the United States, both federal and local officials have some power to enforce quarantines, according to the Centers for Disease Control and Prevention. At the local level, that authority has been exercised by judges declaring states of emergency and governors ordering public spaces to close.

Strict quarantine orders are becoming more common as the coronavirus outbreak becomes more dire in the United States. On Monday, President Trump urged people to avoid gatherings of more than 10 people, stop eating out at restaurants and postpone any nonessential travel. The president added that coronavirus could continue to affect life in the country until July or August.