It’s troubling, though not surprising, to see covid-19 cases spiking across the American South and Southwest, where public officials delayed lockdowns, rushed to reopen businesses, or refused to require people to wear masks.

But what’s the matter with California? The nation’s most populous state was the first to enact statewide shelter-in-place rules, took decisive steps to build up the recommended testing and case tracing capacity, and has hammered the public health message on social distancing and masks.

Yet new cases are rising sharply in pockets throughout the sprawling state, even as they’re flat or falling across much of the East Coast. Positive tests over the last seven-day period have risen 45%, regularly topping 5,000 a day, Governor Gavin Newsom said during a press conference on Monday. Hospitalizations and intensive care unit admissions are both up around 40% over the past few weeks as well, threatening to overwhelm health-care systems.

In turn, Newsom has pressed Imperial County—the southernmost part of the state, where skyrocketing case loads have forced officials to move hundreds of patients to hospitals in neighboring areas—to fully reinstate stay-at-home orders. He’s also recommended or required that more than a dozen counties shut down their bars, including Los Angeles and Santa Clara, the home of Silicon Valley. Meanwhile, San Francisco’s mayor halted the city’s reopening plan on Friday.

So what’s driving the outbreaks in a state that supposedly did things right? Why weren’t its ambitious testing and contact tracing programs adequate to prevent the recent surge in cases?

“It’s not one thing, but four or five,” says George Rutherford, an epidemiologist at University of California, San Francisco, who is leading the university’s training program for the state’s contact tracing task force. “The state is so big—the population of California is larger than Canada—and there’s a lot of different things going on in different places.”

Health officials believe the state’s efforts to boost testing and rapidly track down infections is helping. California’s number of cases per capita—567 per 100,000—is well below the rates for states like Alabama, Arizona, or Florida. And Rutherford says about 85% of the people known to have interacted with positive patients are returning calls or answering questions from the state’s contact tracers, who are tasked with tracking down possible infections and encouraging people to quarantine or isolate themselves.

But clearly not enough people are strictly following these recommendations, and others, from public health officials—sometimes due through carelessness, and sometimes due because of financial strains and other constraints.

Here are some of the main drivers at work:

Ethnic disparities

Throughout the state, Latinos make up by far the largest share of cases (56%) and deaths (42%), according to data from the California Department of Public Health. While Latinos make up 39% of the population, whites are a close second at 37% but represent only 17% of covid-19 cases.

These infections appear to be concentrated within low-income communities, where people are often essential workers who can’t do their jobs from home, can’t afford to call in sick and may live in crowded housing conditions, according to information from contact tracing programs as well as other research and reporting. Language, immigration status and financial issues can complicate efforts to successfully reach infected patients or their close contacts in these communities, and convince them to isolate themselves for extended periods.

Early results from a covid-19 screening project in San Francisco’s heavily Hispanic Mission neighborhood found that 95% of those who tested positive were “Hispanic or Latinx” (the difference is explained here). And 90% of infected patients said they couldn’t work from home.

People are becoming cavalier

Another major factor is that people are ignoring safety practices, according to a state breakdown of counties experiencing rising cases. As regions relax stay-at-home rules, families, friends, and strangers are increasingly gathering in homes, bars, restaurants, and other venues. Too often, they’re not wearing masks or staying far enough away from each other, said Mark Ghaly, secretary of California’s Health and Human Services Agency, during the Monday press conference.

Los Angeles County has become the nation’s largest epicenter of the disease, with nearly 98,000 confirmed cases, according to Johns Hopkins University’s coronavirus tracking map.

The Los Angeles County Department of Public Health announced on Sunday that it would heed Newsom’s directive to shut down bars, noting that the region’s sharp increase in cases and hospitalizations directly coincides with the reopening of businesses a few weeks earlier. Those include breweries, pubs, wineries, and other venues “where people remove their face covering to drink while they may be socializing with people not in their households,” the statement read.

“I implore that our residents and businesses follow the public health directives that will keep us healthy, safe, and on the pathway to recovery,” said Barbara Ferrer, the county’s director of public health. “Otherwise, we are quickly moving toward overwhelming our health-care system and seeing even more devastating illness and death.”

Explosions in prison cases

More than 2,500 state and federal prison inmates throughout California are infected with the coronavirus. More than 1,000 prisoners and staff members tested positive in San Quentin State Prison alone during the last few weeks, in an outbreak linked to the transfer of inmates from the California Institution for Men in Chino, where there are more than 500 active cases.

The spillover of patients into local hospitals has forced Marin County, where San Quentin is based, to pause its plans to reopen gyms, hotels, and other businesses.

An influx of cases from elsewhere

A variety of other factors are driving higher case counts, including increasingly widespread testing across the state (which totaled nearly 106,000 on Sunday), continuing outbreaks in nursing homes in several counties, and patients from outside California crowding into counties with better testing and treatment.

Part of what’s driving the soaring case loads in Imperial County is the influx of positive patients from Mexico. State officials say they’re primarily US citizens, hundreds of thousands of whom live in neighboring Baja, crossing back in search of superior health care.

The county has by far the state’s highest case numbers on a per capita basis, 3,414 per 100,000, as well as a positivity rate for tests that’s more than four times the state average.

The different drivers may demand different interventions, health experts say. Officials need to make extra efforts to communicate with low-income Latino patients and provide money, food, housing, or other services to help them isolate while they’re infectious. (San Francisco has some programs like this in place, but clearly more are needed throughout the state.) Prison systems need to keep infected inmates isolated, and ensure that they’re no longer spreading the disease across facilities. And nursing homes should test patients and workers more often, and step in more rapidly at the signs of an outbreak.

But pretty much all of this has been known from the start. Californians needs to recognize that the dangers haven’t passed, even as regions relax certain rules. Everyone still has to keep away from others, vigorously wash their hands, and abide by the one public health decree that may help the most.

“Wear masks,” UCSF’s Rutherford says.