Six Bay Area counties announced “shelter in place” orders for all residents on Monday — the strictest measure of its kind yet in the continental United States — directing everyone to stay inside their homes and away from others as much as possible for the next three weeks in a desperate move to curb the rapid spread of coronavirus across the region.

The directive was set to begin at 12:01 a.m. Tuesday and involves San Francisco, Santa Clara, San Mateo, Marin, Contra Costa and Alameda counties — a combined population of more than 6.7 million. It is to stay in place until at least April 7. The three other Bay Area counties — Sonoma, Solano and Napa — did not issue similar mandates.

Just outside the Bay Area, Santa Cruz County late Monday also announced a “shelter in place” order for its 275,000 residents.

The orders — which are all similarly worded — fall just short of a full lockdown, which would forbid people from leaving their homes without explicit permission. The orders (read San Francisco’s here in its entirety at tinyurl.com/waddyqv) call for county and city sheriffs and police chiefs to “ensure compliance,” and local authorities said they would not “rush to enforce” the directives as residents adjusted to understand what activities are no longer allowed. Violation of the orders is considered a misdemeanor punishable by a fine or jail time.

Businesses that do not provide “essential” services must send workers home. Among those remaining open are grocery stores, pharmacies, restaurants for delivery only and hardware stores. Most workers are ordered to stay home, with exceptions including health care workers; police, fire and other emergency responders; and utility providers such as electricians, plumbers and sanitation workers. BART will run for essential travel, and airports are not closing.

“We were seeing a tipping point here in Santa Clara County with exponential growth of our cases,” said Dr. Sara Cody, health officer for the county, at a news conference Monday. The county had 138 cases as of Monday — an increase of 72 since Friday. “Over the weekend, I had a discussion with fellow health officers in the Bay Area and we realized that we are one region, and that what’s happening in Santa Clara County today will soon be happening in the adjacent jurisdictions. We decided collectively we need to take swift action as soon as possible to prevent further spread.

“These orders were crafted with great thought and with great care,” Cody said. “They were also crafted very, very quickly.”

She said residents would get more information over the coming days as to what exactly is expected of them — but the priority is to stay inside and away from others.

The directive allows for people to go outside — and in fact, health officers encouraged people to run, hike and walk their dogs, as long as they do it alone or with close family, and keep 6 feet away from others. Trails and parks are open, but people cannot gather in groups. Recreation centers and clubhouses are closed.

The region is the first to direct people to stay home as much as possible and avoid even small social interactions. On Friday, Santa Clara County had banned all gatherings of 35 people or more.

“I thought that announcement was hard, this one is exponentially harder,” Cody said.

In Washington state — where a Seattle-area outbreak has infected more than 400 and killed 37 — public health officials on Monday announced that bars, restaurants, clubs, gyms and other indoor social or recreational venues were to be closed until March 31. The state also banned all gatherings of 50 or more people. But the restrictions stopped short of advising people to shelter in place and did not ban non-essential travel.

“My fellow San Franciscans, what we are asking for everyone to do is to remain at home for all but the most essential outings for your safety and the safety of those around you,” San Francisco Mayor London Breed said at a news conference Monday.

The orders come as cases of COVID-19, the illness caused by the new coronavirus, climb rapidly around the region. The Bay Area has reported nearly 300 cases since the outbreak began — but more than half of those cases were in the past four days alone. And national testing shortfalls mean that there are certainly many more hundreds and possibly thousands of cases in the region that have not been diagnosed, infectious disease experts say.

Five people have died of COVID-19 in the Bay Area, including two deaths reported in Santa Clara County on Monday.

Now Playing:

Increasingly aggressive responses — such as limiting large gatherings and closing schools — have not slowed the spread of the disease, and public health officials agreed over the weekend that much more restrictive tactics were needed to force people apart. Authorities fear that regional hospitals could be overwhelmed by a crush of seriously ill patients if the virus is allowed to keep spreading as it has been.

In the six Bay Area counties and Santa Cruz, non-essential gatherings of any size are now banned, along with non-essential travel “on foot, bicycle, scooter, automobile or public transit.” People may travel for shopping for necessary supplies, accessing health care and providing aid to family and friends who need assistance, and for non-residents, returning to their homes outside the region.

Airports, taxis and public transit — including BART — will remain operational, but only for essential travel, and people are expected to keep 6 feet apart when possible. BART officials said they would ensure “long enough trains to allow for social distancing.”

Now Playing:

People in the seven counties will still be able to go shopping for items such as food and household supplies, and seek medical care. They will be able to go outside for fresh air or exercise as long as they keep away from anyone they don’t already live with.

People who are homeless are exempt from the order but encouraged to find shelter. In response to the directives, Alameda and San Francisco counties announced they were suspending all evictions.

People who are older or have underlying health problems are being told to stay inside at all times except for health care, under the new directive. They should ask someone to shop for them if they are able.

The order calls for all “routine medical appointments” and elective procedures to be canceled or rescheduled. “To the extent possible, all health care visits that are not canceled or rescheduled should be done remotely,” the order states.

In San Francisco, Police Chief Bill Scott said his department would be “looking for voluntary compliance” with the health order. Police could cite people for failing to comply with it — but Scott was clear that such a measure was an “absolute last resort.”

Grocery stores and pharmacies will remain open, and restaurants may stay open to provide takeout food only. Also staying open: veterinary services, gas stations and auto repair shops, hardware and other home supply stores, banks and laundry services. Businesses that remain open are encouraged to keep both employees and customers 6 feet apart, including while standing in line. But there are no specific limitations on the number of people allowed inside.

Daycare centers may stay open, but children must be kept in groups no larger than 12, and they must stay with the same group of children every day.

For area residents, it is just the latest in a series of steps pushing them to their homes, away from the office, large gatherings and other social activities in recent weeks. Rashid Ibarra said he’s already steeped in a social isolation mind-set, after weeks of worsening news about the virus.

“I know what it means to have the president declare a state of emergency,” Ibarra said. “I was supposed to be at work today but I called in.” His employer has given workers an advance on their sick time, he said.

At the corner of Larkin Street and Golden Gate Avenue, he said his immediate plans were “to go get some pastries and then go and kick it at the pad.”

Solano County public health officials said they did not plan to join the regional shelter-in-place orders. But they said high-risk people, including older adults, are advised to follow similar recommendations. Sonoma and Napa county officials said they were watching the situation but had no immediate plans to issue a similar order.

The announcement came just a day after Gov. Gavin Newsom advised that all bars in the state be closed, and that restaurants reduce capacity. Several states have announced closures of bars, restaurants and entertainment venues, and instituted curfews. Also on Sunday, the Centers for Disease Control and Prevention urged that all gatherings of 50 or people or more be stopped nationwide — the agency’s strongest advisory so far. As of Monday morning, confirmed U.S. COVID-19 cases had topped 4,000, but the actual number of infected people is said to be far higher.

And on Monday, President Trump advised Americans to avoid bars and restaurants, and any social gatherings of 10 or more people.

“We are in a rough place. And we are going to have difficult times ahead of us,” Dr. Scott Morrow, the San Mateo County health officer, said at a Monday news conference in San Jose. “The measures that we are putting in place are temporary. But they will last longer than any of us want. This is the time to unite as a community, to come to each others’ aid and dig really deep.”

San Francisco Chronicle staff writers Dominic Fracassa, J.K. Dineen, Joaquin Palomino and Sarah Ravani contributed to this report.

Erin Allday is a San Francisco Chronicle staff writer. Email: eallday@sfchronicle.com Twitter: @erinallday