Regulators in California, the country's third-largest oil-producing state, have authorized oil companies to inject production fluids and waste into what are now federally protected aquifers more than 2,500 times, risking contamination of underground water supplies that could be used for drinking water or irrigation, state records show.

While the permits go back decades, an Associated Press analysis found that nearly half of those injection wells — 46 percent — were approved or began injections in the last four years under Gov. Jerry Brown, who has pushed state oil and gas regulators to speed up the permitting process. That happened despite growing warnings from the U.S. Environmental Protection Agency since 2011 that state regulators were out of compliance with federal laws meant to protect underground drinking-water stores from oilfield contamination.

In California, "we need a big course correction. We need to get the system back in compliance," said Jared Blumenfeld, regional administrator for the EPA. "Californians expect their water is not being polluted by oil producers ... This poses that very real danger."

The injections are convenient for oil companies because drilling brings up 13 gallons of wastewater for every gallon of petroleum. And one of the easiest disposal methods is simply to send that waste back underground.

The federal government is now demanding that state officials do more to find and deal with any contamination and end oilfield injection in all aquifers set aside for families and farms.

Those water supplies are especially vital because California, the nation's most populous state and its agricultural leader, is now entering the fourth year of a historic drought, making water more scarce. Oil-industry operations can introduce high levels of salts or other contaminants that can ruin water aquifers for drinking or watering crops and livestock.

State officials acknowledge that regulators erred, citing confusion about the boundaries of aquifers and oil fields, long-standing state misinterpretations of federal water-safety requirements and lack of communication between state-level oil and water regulators.

The vast majority of the more than 2,500 permits under scrutiny were issued after the 1974 Safe Drinking Water Act heightened protection for underground water supplies.

For some of the permits, "we don't know how this got approved," said Jason Marshall, deputy director of the California Department of Conservation, which directly regulates the state's oil and gas industry.

In one case, regulators signed off on an application to inject wastewater into a federally protected aquifer, then realized their error and raced to the site.

"He had done injection for about 20 minutes," Marshall recalled. "We just said, 'Stop! You can't do that. Stop.'"

So far, state officials say they have no evidence that water wells have been contaminated. Last summer, state officials shut down nine disposal wells deemed most threatening to underground drinking-water supplies. The state has now tested nine of more than 100 water wells within a mile of those now-idled disposal wells, and found no obvious signs of contamination, state officials said.

However, Blumenfeld said, poor record-keeping by the state over the years makes that determination difficult.

Worries persist. "The problem with just monitoring (for contaminants) is once you see it in the well, it's too late," said Timothy Parker, an independent Sacramento-based groundwater expert who has worked for the state Department of Water Resources and in the oil industry. "It's very difficult to clean up an aquifer once it's contaminated."

Over the summer, state oil and gas regulators sent the EPA lists of permits that allow oil companies to inject waste or production fluid into aquifers that were either protected by the federal government or supplied water wells. In December, the EPA gave the state until Friday to draft a plan for halting the practice and bringing the state into compliance with the Safe Drinking Water Act. The state has until 2017 to stop injections into any aquifer that has not been specifically designated by the EPA for oil-industry waste disposal or drilling.

Officials are determined to both "manage the transition" back into compliance with the federal water act and to "maintain a robust oil industry," said Steve Bohlen, head of oil, gas and geothermal resources for the California Department of Conservation.

Of the 2,553 injection wells that the state has identified as risking contamination of protected aquifers, 1,172 were approved by the state or began injection in just the last four years since Brown took office, according to state records.

Brown is known globally as a leading supporter of solar, wind and other renewable energy. But the Democratic governor has also supported tapping California's oil reserves.

In late 2011, Brown fired the state's top two oil-and-gas regulators after oil companies complained that their environmental reviews were slowing the flow of drilling permits. By early 2012, he was boasting of a double-digit jump in drilling-permit approvals as a result of those firings.

"The oil rigs are moving in Kern County. We want to use our resources ... our sun and all the other sources of power," Brown told a crowd in 2012 at the opening of a solar plant near Sacramento. "It's not going to be easy. There's going to be screw-ups. There's going to be bankruptcies. There'll be indictments, and there'll be deaths. But we're going to keep going. Nothing's going to stop us."

Richard Stapler, spokesman for California's Natural Resources Agency, said neither the firings nor Brown's statements played a role in the hundreds of drilling permits granted for protected aquifers in his most recent term.

State officials said high oil prices earlier in the decade and a U.S. push for domestic oil production led to a surge in mistakenly granted permits.

"What we really want to do right now is make sure we're not currently impacting public health and to put safeguards in place to make sure this does not happen again, and then we can determine precisely how it occurred in the past," Stapler said.

Most of the permits were granted for drilling sites in central California's Kern County, one of the nation's leading petroleum-producing counties. At least a dozen times, state oil and gas regulators authorized drilling into protected aquifers underlying federal land controlled by the Bureau of Land Management.

Many of the injection wells are in oilfields thick with rigs, tanks and disposal wells. But others are among citrus groves, row crops and houses.

The AP found more than 170 of the permits involved aquifers that met both federal and state standards for potential drinking-water sources. That included at least 27 permits that authorized injections into aquifers with water that state records rated clean enough to be tapped for drinking without treatment.

In a Bakersfield neighborhood that is home to one of the oil-industry wells shut down this summer for threatening water wells, resident Tony Lemon stood next to a bobbing drilling rig on the edge of his driveway. He and other neighbors said they had been told nothing about any threat to water.

But Lemon said he trusted oil companies to safeguard the public water supply.

"As long as they know what they're doing, taking care of business," Lemon said.

Like others in Bakersfield, he stressed the jobs and money that the oil industry offered the community.

At issue are what the oil industry and regulators call Class II injection wells, which are used to inject high-pressure steam or fluids and other agents underground to force up oil and gas. They are also used to dispose of briny water and other waste that comes up with the oil.

The injected wastewater is often cleaner than the water already underground. Other times, the injections can include high levels of salt or other chemicals.

Industry representatives say any threat to underground water sources is minimal.

"It's not a crisis, not a wide-scale problem. I think the fact the (state) identified the issue, took action and is now seeking to remedy, suggests the system works pretty well," said Tupper Hull of the Western States Petroleum Association industry group.

Chad Hathaway, a fourth-generation oilman based in Bakersfield, described at least one state regulator acknowledging that an aquifer was EPA protected even as the regulator gave Hathaway a permit to discharge into it.

Just because the EPA hasn't said so, "doesn't mean it's not an exempted aquifer," Hathway recalled the official telling him. The episode happened before Bohlen's appointment last June as head of state oil and gas regulation, Hathaway said.

Blumenfeld, the EPA regional administrator, said his agency had encountered similar episodes.

"Unfortunately, that isn't as surprising as it should be. Ultimately the checks and balances have not been in place to ensure the integrity of the system," he said.

Although four smaller producers had injection wells shut down, Chevron Corp., the world's ninth-largest oil company by production, rejected a state request this past August to shut down seven injection wells that were found to be operating near water wells, said Marshall of the Department of Conservation.

Chevron's refusal means its wells continue to inject oil-field wastewater as close as 88 vertical feet to active water wells that supply homes or businesses in Kern County, according to stateWater Resources Control Board records.

Chevron disputed the state's account, saying one well cited as active in state records was actually out of use. The company is already injecting hundreds of feet below most of the waterwells, and was seeking permits to make those injection wells deeper still.

Oil industry representatives say they expect the EPA to retroactively allow drilling in many of the aquifers where the industry is already injecting fluids. But the federal crackdown is already stirring tensions, including lawsuits by both oil companies and farmers.

In an orchard within sight of one of the disposal wells shut down by the state, fourth-generation farmer Mike Hopkins ran a hand over his face and turned around for a minute to compose himself when asked about the threat that oil-field wastewater poses to the aquifers that farmers use for irrigation.

Hopkins said damage from injections forced him to pull up his cherry trees in 2013, and he has filed a lawsuit blaming the oil companies with fracking wells and other installations that ring his orchards. The companies deny responsibility.

"We're farmers," Hopkins said. Pulling up the withered fruit trees "broke our hearts."