The Trump administration accused the state of California Thursday of “failing to meet its obligations” to protect the environment, claiming that a growing homeless population threatens the state’s water quality.

Days after President Trump mocked Los Angeles and other big cities for their “tremendous pollution,” EPA Administrator Andrew Wheeler sent an oversight letter charging California officials with failing to meet federal health standards in numerous communities where large homeless populations litter the streets with trash, drug paraphernalia and human waste.

The unusual move ratchets up the Trump administration’s ongoing assault on the nation’s most populous state, a multipronged campaign that California Gov. Gavin Newsom (D) has described as “weaponizing” the federal government. The outcome of that battle — which has involved the Justice Department and the Department of Homeland Security, as well as the EPA — could determine who gets to set policy on a range of issues, from immigration to transportation.

But environmental policy has been the sharpest flash point. California has long led the nation in demanding stricter limits on pollution linked to climate change. Now, the Trump administration is arguing that the state’s focus on global warming has come at the expense of more basic environmental protections.

“The agency is aware of the growing homelessness crisis developing in major California cities, including Los Angeles and San Francisco, and the impact of this crisis on the environment,” Wheeler wrote. “Based upon data and reports, the agency is concerned that California’s implementation of federal environmental laws is failing to meet its obligations required under delegated federal programs.”

Under extraordinary circumstances, the EPA can take over enforcement of federal pollution laws. In the letter, Wheeler gives Newsom 30 days to demonstrate that state officials have “adequate authority and capability to address these issues.”

In the past month alone, the administration has moved to revoke the state’s long-standing right to limit air pollution from cars, begun investigating an agreement with four automakers for possible antitrust violations and threatened to withhold federal highway funds if California does not do more to clean up its air.

“There’s a common theme in the news coming out of this White House this week. The president is abusing the powers of the presidency and weaponizing government to attack his political opponents,” Newsom spokesman Nathan Click said in an email. “This is not about clean air, clean water or helping our state with homelessness. This is political retribution against California, plain and simple.”

San Francisco Mayor London Breed (D) echoed that concern, saying in a statement: “I’m sick of this president taking swipes at our city for no reason other than politics.”

“There are no needles washing out to the bay or ocean from our sewer system, and there is no relationship between homelessness and water quality in San Francisco,” Breed said. “It’s just not a real issue.”

California has emerged as a potent counterweight to the Trump White House, advancing liberal priorities on issues ranging from climate change to abortion rights. Its attorney general, Xavier Becerra, has sued the administration 62 times in federal court, and has blocked Trump from ending protections for young immigrants who were brought to the United States illegally by their parents.

EPA officials said they are not trying to single out California, noting that the state has significant pollution problems. Its oversight letter cited 202 California water systems that have recently reported drinking water problems. The state also has 82 areas that don’t meet air standards for six pollutants.

However, about three dozen other states also have counties that failed to meet national benchmarks for air pollution. And last year, the EPA estimated that 3,508 community water systems were out of compliance with health standards.

Trump, for his part, has routinely criticized California officials for failing to protect their citizens from a range of threats, including wildfires and criminal acts by undocumented immigrants. At times, the president and Newsom have hurled insults at each other via Twitter.

Just last week, Trump blasted California’s environmental record after a visit to the state, telling reporters aboard Air Force One that “there’s tremendous pollution being put into the ocean because they’re going through what’s called the storm sewer that’s for rainwater.”

“We have tremendous things that we don’t have to discuss pouring into the ocean. You know, there are needles, there are other things,” he said. “It’s a terrible situation that’s in Los Angeles and in San Francisco.”

Trump declared last week that the EPA would put California on notice, but officials were unsure what statutes would be used, according to two White House officials who spoke on the condition of anonymity to discuss internal deliberations.

Then this week, EPA officials suggested California authorities are doing an inadequate job curbing air and water pollution, and ranked the state near the bottom in the nation. On Monday, Wheeler notified the California Air Resources Board that it risks losing billions in highway funding if it does not offer updated plans on how it plans to meet federal health-based standards for soot, smog and other pollutants.

Trump regularly brings up California’s homelessness problem in meetings, urging aides to highlight what he sees as bad governance by Democrats — and to step in. Earlier this month, officials from several agencies, including the EPA, traveled to Los Angeles to study homelessness and visit the city’s infamous skid row. Last week, the administration rejected California’s request for more federal funds to expand programs aimed at addressing the problem.

Harmeet K. Dhillon, national co-chair for Women for Trump who spent time with the president during his recent California visit, said Trump does not hold a grudge against the state, even though it has “sued him 60 times.”

“I think the president shows remarkable good humor and grace when California has its hand out for support of fires or whatever the state needs,” Dhillon said. Referring to homelessness and the environment, she added: “I don’t think the president wants to take over these issues.” But “it is appropriate for the federal government to have scrutiny on California.”

Since Trump took office, EPA leaders have emphasized improving water quality as a top priority across the United States, including in a long-term strategic plan last year. The EPA routinely forges long-term agreements with state and local governments to address sewer and storm water issues.

It is rare, however, for the agency to accuse state officials of failing to enforce federal pollution standards on a broad scale. EPA officials acknowledge that Thursday’s letter was the first of its kind under the Trump administration.

Though a similar letter was sent to Wisconsin in 2011 under the Obama administration, that missive gave the state three months to reply and came after half a dozen meetings and calls with state officials.

Drawing on public databases and press reports, Wheeler’s letter noted that California has posted studies noting that human waste can increase bacteria levels in water off its beaches. He also detailed a litany of federal water quality violations across the state, saying officials have “not acted with a sense of urgency to abate this public health and environmental problem.”

His examples include a “years-long practice” in San Francisco of discharging more than a billion gallons of combined sewage and storm water annually into San Francisco Bay and the Pacific Ocean without treating it fully for all biological contaminants.

San Francisco officials said this discharge is being done under a federally approved permit, and 99 percent of it is storm water.

San Francisco is one of the few major American cities that combine storm water and sewage flows that is not operating under a federal consent decree. It is spending billions to upgrade its aging infrastructure, including $4.8 billion to improve regional and local water systems used by 2.7 million people. It has also launched a 20-year, multibillion-dollar sewer system upgrade.