Mr. Newsom’s office hit back, saying the E.P.A.’s action was of a piece with the Ukraine scandal fueling impeachment talk and engulfing the White House.

“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. This is not about clean air, clean water or helping our state with homelessness. This is political retribution against California, plain and simple,” Nathan Click, a spokesman for Mr. Newsom, said in a statement.

The Trump administration also has taken aim at California in other ways, attacking the state for its handling of the homeless problem, and threatening to cut off critical federal wildfire aid.

The E.P.A. letter lays out a multitude of accusations and says the state’s lack of response to its homeless crisis “prompted E.P.A. to review other programs.” It cites numerous pollution discharges into public water systems. While the letter does not explicitly threaten to take funding away from California, it notes that California has received $1.16 billion in federal water treatment funds over the past five years.

Mr. Wheeler cited press reports that human feces from homeless people in Los Angeles and San Francisco is increasingly common on streets and sidewalks. “The E.P.A. is concerned about the potential water quality impacts from pathogens and other contaminants from untreated human waste entering nearby waters.”

Want climate news in your inbox? Sign up here for Climate Fwd:, our email newsletter.

The letter goes on to cite numerous other problems, including exceeded arsenic and lead levels, and gave the state 30 days to deliver a “remedial plan.”