Against the backdrop of California’s historic drought, two environmental groups filed a lawsuit Thursday demanding that the state stop allowing oil industry wastewater to be injected into protected, clean aquifers.

In response to an investigation showing the California Department of Conservation has been allowing oil companies to inject waste into clean water sources for years, the department, named in the suit, only issued a “emergency rulemaking action” that allows the wastewater injections to continue until 2017.

The lawsuit, filed by Earthjustice on behalf of the Sierra Club and the Center for Biological Diversity, asks that the action be invalidated and that the Division of Oil, Gas, and Geothermal Resources be forced to immediately stop the continued wastewater injections.

Wastewater from oil and gas drilling can contain heavy metals, radioactive material, and chemicals like arsenic and benzene. Injection wells, where toxic substances are pumped deep underground, have been used for hazardous material disposal for decades, but an investigation by ProPublica in 2012 found that “structural failures inside injection wells are routine” and pose a tremendous health risk.

The state division responsible for regulating injection wells denies that the approximately 2,500 improperly-permitted wells pose a risk.

“As we’ve said before, the protection of California’s groundwater resources – as well as public health — is paramount, particularly in this time of extreme drought. The state and the U.S. Environmental Protection Agency are moving aggressively and quickly to test all wells that risk harming sources of water for drinking and agriculture,” California State Oil and Gas Supervisor Steven Bohlen, head of the Division of Oil, Gas, and Geothermal Resources, told ThinkProgress in a statement.

“Thus far, testing of water supply wells by the State Water Resources Control Board has revealed no contamination of water used for drinking or agricultural purposes related to underground injection by the oil and gas industry. We intend to keep it that way,” he said.

He also noted that the department has shut down 23 wells but said it was done “out of an abundance of caution.”

California produces about 17,000 barrels of oil a month. At a rate of roughly eight barrels of water per barrel of oil, that means California’s oil industry uses more than 51 billion gallons of water each year.

At least one company, Chevron, has been selling its wastewater to California’s drought-stricken farmers. The water has been treated, but independent testing has also found dangerous contaminants such as acetone and methylene chloride, as well as crude oil, in wastewater Chevron sold for irrigation purposes.

The other option is injection wells.

“In California, we don’t have the luxury of saying certain water is high priority and certain water is low priority,” Kretzmann said. “It’s all high priority right now.”