It is the most extreme measure taken nationwide, although New York Mayor Bill de Blasio has said he is considering something similar by the end of the week. Belgium became the fourth European nation to enter into a nationwide lockdown Wednesday, joining Italy, France and Spain.

The order in San Francisco bans any activities that aren't essential: no drinking at bars, no haircuts by barbers and no dinner parties. Restaurants can operate only for takeout or delivery. Outdoor exercise is allowed, but gyms are closed.

The city, famous in part because of 1967's Summer of Love, is full of people who can bristle at authority. But in the first day after the mayor imposed the shutdown order, backed with the threat of jail time, residents didn't really seem to rebel.

The police department said it wasn't immediately aware of any significant resistance to the order, which would be punishable as a misdemeanor. Its daily crime recap sent to reporters Wednesday morning — which covers reported crimes with violence or the threat of violence — included a single reported entry from the previous day: Three suspects had punched a woman and taken her bicycle.

Full coverage of the coronavirus outbreak

The quiet has been partly deceiving, as Bay Area hospitals have begun to see more COVID-19 patients, the leading edge of what they fear could be a wave of people with severe symptoms.

"This is a challenge unparalleled to any challenge I have faced in the last 28 years of my career," Dr. Baldev Singh, a pulmonary critical care physician in nearby San Jose, said after he finished a 24-hour shift Tuesday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

He warned that the area would be in danger of running low on health care workers who aren't infected. "Protecting your teammates is as important as ever, as the number of infected individuals needing support is anticipated to exceed the number of healthy providers able to serve those in need," he said.

For residents grappling with the public health order, there were immediate questions about what counted as "essential." They could exercise, but could they drive somewhere to exercise? Yes, the mayor's office told the San Francisco Chronicle.

City health officials, who initially told marijuana dispensaries that they had to close, mellowed their stance late Tuesday and said cannabis products were an essential medicine that justified the shops' staying open.

A battle over what's essential was brewing at automaker Tesla, which operates a factory in Alameda County across the bay from San Francisco. An executive said Wednesday that the company had received conflicting guidance from the government on whether it could stay open.

Grocery stores were limiting the number of people who could be inside at any one time, trying to reduce personal contact and allow staff to restock shelves. A Whole Foods Market advised people wanting to buy milk or eggs to be in line before the store opens at 8 a.m., while another grocer posted a summary to social media of what's available: bread but no toilet paper.

Commuter traffic, typically among the worst in the nation, was suddenly not a problem for those who had to drive.

The city's massive tourism industry ground to a halt as authorities closed attractions like Alcatraz Island, the historic cable cars and the beat-poet bookstore City Lights. In Fisherman's Wharf, a neighborhood popular with visitors, the few open shops included a hardware store and an In-N-Out Burger, for takeout orders only.