More than 60 million residents of U.S. cities have been placed under curfews in recent days, as cities burned in protest of the death of another black man in police custody. It is a measure pandemic-weary government officials hoped would deter violence and stanch the damage to their battered cities.

The curfews affected people in more than 200 U.S. cities and at least 27 states, including all of Arizona, and followed intense protests over the death of George Floyd, a 46-year-old man who died a week ago after a Minneapolis police officer handcuffed him, put him facedown on a city street and pressed his knee against the back of his neck for eight minutes.

While officials expressed horror at Floyd’s death, they said the curfews were necessary to discourage the arson and smashed storefronts engulfing cities still struggling to contain the coronavirus that has killed more than 100,000 people this year. Protests surged just as many localities were cautiously reopening businesses to counter soaring unemployment.

Curfew violators risked arrest and, in some cities, jail time.

San Francisco started its curfew Sunday night at 8 p.m. and extended it until the emergency abates, joining a string of other cities in the Bay Area in an emergency lockdown.

Miami-Dade County, which had been planning to reopen its beaches as temperatures climbed into the 80s, shut down from 9 p.m. to 6 a.m., and beaches remain closed around-the-clock.

And in Birmingham, an Alabama city that is a cornerstone of the civil rights movement, and has survived decades of racial terror, Mayor Randall Woodfin announced a curfew on Monday after a grim night of looting. He blamed the unrest on “looters and anarchists” and said authorities would “happily” arrest them if they are out between 7 p.m. to 6 a.m.

“Birmingham, this is not us,” he said Monday, evoking memories of the nonviolent marches led by leaders such as Martin Luther King, Jr. “This is not how we taught the world how to protest. Violence, looting and chaos is not the road to reform.”

Curfews were imposed in municipalities large and small, from the town of Hibbing, Minn., pop. 15,800, to the 7 million residents in the state of Arizona. Scott County, Iowa, home to the city of Davenport, imposed a curfew. So did sprawling Los Angeles County, home to 10 million people, citing the “national chaos” surrounding the demonstrations.

While the curfews have generally run from dusk to dawn, the hours varied. Los Angeles County’s lockdown runs from 6 p.m. to 6 a.m. and bars residents from all parks, roads and streets “until further notification.” Violators face arrest and up to six months in jail.

New York City’s curfew is far more abbreviated, kicking in at 11 p.m. Monday and ending at 5 a.m.

Some lockdowns lasted only a few hours — Jacksonville, Fla., lifted its after limited demonstrations, according to the city Facebook page — while others remained fluid as city and state leaders monitored each day’s events. Washington Mayor Muriel E. Bowser (D) extended the curfew Monday after a night of flames and looting.

Exceptions were made for people such as first responders, medical emergencies, the media and military personnel.

Other cities already had curfews or stay-at-home orders because of the coronavirus. Boston’s curfew, for instance, runs from 9 p.m. to 6 a.m. and has been in place for months.

Several mayors who imposed the curfews also denounced Floyd’s killing and the ensuing destruction heaped upon many cities where black people already were being disproportionately killed by the coronavirus.

“Seeing the murder of George Floyd sickened me and it still does,” said Chicago Mayor Lori Lightfoot (D), who said Sunday that she supports peaceful protests but was angry with those who wreaked havoc on the city. Instead of fighting racism, she said, “we have instead been forced to turn our focus and energy towards preventing wanton violence and destruction.”

Cities such as Floyd’s hometown of Houston eschewed curfews in favor of direct entreaties to demonstrators.

Houston Police Chief Art Acevedo joined the protesters wearing his police uniform and a face mask, and implored them not to follow others’ destructive impulses, calling looting the “devil’s work.”

“I will march until I can’t stand no more. But I will not allow anyone to tear down the city because this is our city,” he said in an emotional speech captured on a now-viral video.

“Pay close attention,” he added, “because these little white guys with their skateboards are the ones who are starting all the s---.”

Houston Mayor Sylvester Turner (D) is not considering a curfew, spokesman Tejal Patel said in an email Monday, though Turner did impose a curfew in 2017 to prevent looting in homes evacuated during the flooding following Hurricane Harvey.

But Patel said those circumstances were different.

“Mayor Sylvester Turner is pleased that the protests have, for the most part, been peaceful and respectful,” he said, noting that Acevedo himself has “engaged positively with those who want to exercise their constitutionally protected right to demonstrate.”

Hurricane Harvey, in contrast, “was a natural disaster of epic proportions” that made it unsafe to go outside.

New York Mayor Bill de Blasio (D), who initially resisted imposing a curfew on a city already hit hard by the coronavirus, changed his mind Monday after a weekend of violence, including a disturbing incident, captured on video, of police SUVs driving into demonstrators.

“There are advantages and disadvantages, to say the least, to instituting a curfew,” de Blasio, whose 25-year-old daughter Chiara was among those arrested during the protests, said before he imposed the curfew. “Previous nights, I think, were different than what we saw last night.”

Several New York counties imposed curfews, including areas home to the larger cities of Rochester, Syracuse and Buffalo.

In Raleigh, the capital of North Carolina, Mayor Mary-Ann Baldwin (D) announced a curfew Monday “after two nights of violence and destruction” and said she hoped the community would “pause, collect ourselves, begin to repair the damage.”

“There are so many people hurting throughout this city, and we need to come together peacefully and as one community,” she said in a statement announcing the curfew Monday. “For those who have protested peacefully, your voices are being heard and will always be welcome. The call for change can’t be answered, however, if we continue to allow destruction of our property and attacks on our small businesses that have already been hurt by this as well as the impacts of COVID-19.”