SANTA BARBARA, Calif. — The leaders of six San Francisco Bay area counties, among the hardest hit by the widening coronavirus outbreak, called on more than 6 million California residents Monday to stay at home for weeks unless faced with an emergency.

The move, among the strictest steps taken nationally to isolate individuals from exposure to the virus, will be enforced by local sheriff's offices and police departments, though authorities said they would tread lightly at the outset as people become accustomed to remaining in and around their homes. Authorities referred to it as a remain-in-place order, something more commonly associated with earthquakes and mass shootings, although people will be allowed to leave home for groceries, to walk their dogs and to carry out other routine activities.

The directive, scheduled to take effect overnight and remain in place until at least April 7, covers six of the nine counties comprising the Bay Area, including Santa Clara County in the center of Silicon Valley, which has the most reported infections of any of the state's 58 counties. The county has reported nearly 140 cases of infection and two deaths.

At a Monday news conference, the county’s health officer, Sara Cody, told reporters that county officials “were seeing a tipping point here in Santa Clara County with exponential growth of our cases.”

Cody said as of Monday the county has seen an overnight increase in infections of 24 people, or roughly 17 percent.

“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,” Cody said. “We decided collectively we need to stake swift action as soon as possible to prevent further spread.”

In addition to Santa Clara County, San Francisco, Marin, Alameda, Contra Costa and San Mateo counties are included in the order. Sonoma, Solano and Napa counties — the three remaining Bay Area counties — have so far been excluded.

The order builds on steps taken by Gov. Gavin Newsom (D), who has urged the closing of all bars and a curtailing of restaurant capacity, among other steps to keep public gatherings to a minimum.

The message for weeks, as major school districts close across the state, where there have been 335 cases reported and seven deaths, has been to stay at home as much as possible. On Monday, local officials gave weight to that message.

San Francisco Mayor London Breed (D) told her “fellow San Franciscans” on Monday that “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.”