The Senate narrowly confirmed Scott Pruitt as the new Environmental Protection Agency chief on Friday, despite Democrats’ calls to delay the vote until the release of a new trove of documents detailing the Oklahoma attorney general’s relationship with oil and gas companies.

The 52-46 vote divided the Senate along party lines, with just two Democrats ― Sens. Joe Manchin (W.V.) and Heidi Heitkamp (N.D.), who are up for re-election in states with big fossil fuel industries ― voting to confirm Pruitt. Sens. John McCain (R-Ariz.) and Joe Donnelly (D-Ind.) did not vote.

Pruitt won the Senate’s approval the day after Judge Aletia Haynes Timmons of the District Court of Oklahoma County ordered his office to turn over more than 2,500 emails and other documents by Tuesday.

The watchdog group Center for Media and Democracy, represented by lawyers from the American Civil Liberties Union, filed a lawsuit against Pruitt earlier this month, alleging his office had violated Oklahoma’s open records law.

The lawsuit claims that Pruitt, who has served as Oklahoma’s top cop since 2011, failed to respond to nine open records requests seeking communications between his office and major fossil fuel players, including Koch Industries, Peabody Energy and the National Coal Council. The requests were filed as early as January 2015.

“Scott Pruitt is the worst pick ever confirmed to lead the EPA. He’s being sent there to hobble the agency we depend on to protect our health and environment,” Rhea Suh, president of the environmental nonprofit Natural Resources Defense Council, said in a statement. “All the worse, Senate Republicans forced the confirmation vote before the public can know the truth about Pruitt’s ties to industrial polluters.”

Nearly 800 former EPA staffers signed a letter this week urging senators to vote against Pruitt. Democratic senators moved to delay the vote on Friday after live-streaming sometimes heated speeches opposing Pruitt on Facebook.

Joshua Roberts/Reuters Oklahoma Attorney General Scott Pruitt testifies before a Senate Environment and Public Works Committee confirmation hearing on his nomination to be administrator of the Environmental Protection Agency on Jan. 18, 2017.

“Mr. Pruitt has made his reputation litigating fiercely against the EPA’s most important regulations to protect public health and the environment — regulations that comply with federal environmental laws, that are based on good science, that have taken years to prepare, and that have taken fair account of all stakeholders’ input,” Sen. Tom Udall (D-N.M.) said in a speech on the Senate floor. “I cannot support a nominee to lead this agency whose record is so hostile to the environment.”

During his first confirmation hearing last month, Pruitt repeatedly demurred when asked about his close ties to the oil and gas industry, bizarrely referring questions to an office he still technically holds.

Pruitt’s history with Devon Energy, an oil and natural gas producer based in Oklahoma City, became a major flashpoint at the hearing. In 2011, Pruitt sent a letter to the EPA criticizing the agency’s estimates on methane emissions from natural gas rigs. The letter, published by The New York Times in 2014 among 84 pages of correspondence, bears Pruitt’s official letterhead as attorney general, but the words came almost verbatim from a memo drafted by Devon’s lawyers.

Pruitt made his reputation suing the EPA 13 times, repeatedly joining fossil fuel players ― including Oklahoma Gas & Electric and the Domestic Energy Producers Alliance, an industry-backed group ― in filing lawsuits to halt regulations.

Energy companies scratched Pruitt’s back, too. Since 2002, he has received more than $300,000 in contributions from the fossil fuel industry. Oil, gas and coal players donated heavily to two Pruitt-linked fundraising groups that paid for Pruitt’s trips to Hawaii and New Orleans but spent little on elections. Last year, Exxon Mobil Corp. gave $50,000 to the Republican Attorneys General Association ― a group Pruitt chaired in 2012 and 2013 and remains active in ― three weeks before he launched a campaign to defend the oil giant against investigations into its record on global warming.

It’s not hard to see why critics have said Pruitt’s confirmation would amount to a “fox guarding the henhouse.” But that seems like a deliberate move by President Donald Trump, who has vowed to boost the U.S. economy by axing rules meant to protect the environment from industry polluters. Trump, along with other Republicans, appealed to voters in Appalachia’s traditionally Democratic strongholds by blaming jobs losses in the mining sector on EPA regulations.

The coal industry went into a tailspin over the last decade after making bad bets on future Chinese demand as natural gas overtook coal as the utility industry’s preferred fuel. Pruitt acknowledge as much in testimony during a House subcommittee hearing last May, when he pointed to the “shift in electricity generation mix” away from coal and toward his state’s booming natural gas industry.

“This didn’t happen as a result of EPA’s heavy hand,” Pruitt said, according to documents published by the Charleston Gazette-Mail. “Rather, it happened because of fracking and the positive market forces that those sorts of Oklahoma innovations create.”

The EPA consumes just 0.22 percent of the federal budget. Yet a policy memo leaked to Axios proposed steep cuts to the EPA’s budget, including slashing hundreds of millions from grants to states and Native American tribes, climate programs, and environmental programs and management. The administration is also considering gutting the agency’s enforcement division, according to Inside EPA.

“Regardless of political view, background or income level, Americans want the government to protect our air, water and climate,” Andrew Steer, president of the nonprofit World Resources Institute, said in a statement. “If Scott Pruitt rolls back these vital protections, the backlash will be fierce. Meanwhile, Americans’ health and economy would suffer.”

In a fiery statement, the Sierra Club vowed to rally its 2.7 million members to “resist this corrupt administration’s attacks on public health, clean air, and clean water every step of the way.”

“Pruitt has a long record of ignoring science, assaulting public health safeguards, and holding the agency he now leads in contempt,” the 125-year-old environmental nonprofit said in a statement. “This is a vote that should not even have happened, given the unanswered questions about Pruitt’s hidden emails with fossil fuel companies that a judge has ordered to be released next week.”