The Senate voted 52-46 on Friday to confirm Oklahoma Attorney General Scott Pruitt as the next administrator of the Environmental Protection Agency (EPA), one day after a judge in Pruitt’s home state ordered him to turn over thousands of emails to a watchdog group.

Shortly after the vote, the Senate adjourned until Feb. 27. After the recess, lawmakers will hold votes on the nominations of Rep. Ryan Zinke (R-MT) and former Texas Gov. Rick Perry to lead the Interior and Energy departments, respectively.

The vote to confirm Pruitt fell mostly along party lines. Two Democrats, Sens. Heidi Heitkamp (D-ND) and Joe Manchin (D-WV), voted in favor of Pruitt, while one Republican, Sen. Susan Collins (R-ME), votedagainst him, as did Sens. Angus King (I-ME) and Bernie Sanders (I-VT). Sens. Joe Donnelly (D-IN) and John McCain (R-AZ) did not cast votes.

“I am pleased Mr. Pruitt was finally confirmed as our next EPA administrator,” said Rep. Kevin Cramer (R-ND), a new member of the influential House Subcommittee on Energy and Power. “With his healthy skepticism of agency power, Administrator Pruitt will return environmental protection to the states where it rightfully belongs.”

Sen. Lisa Murkowski (R-AK), chairman of the Senate Committee on Energy and Natural Resources, said she had a “keen interest” in whoever leads EPA and voted for Pruitt in part because of how hard her state has been hit by EPA regulations. She also chairs the Interior, Environment and Related Agencies Subcommittee, which appropriates funding to EPA.

“Scott Pruitt has extensive knowledge of the laws that guide the EPA, and he is committed to refocusing the agency on actually cleaning up the environment instead of constantly churning out rules with questionable legal authority,” Murkowski said. “He and I share a common belief that we can be good stewards of our air, water and land while at the same time growing our economy.”

In a post to its official Twitter account immediately after the vote, EPA said “We’d like to congratulate Mr. Pruitt on his confirmation! We look forward to welcoming him to EPA.”

According to reports, a district court judge in Oklahoma County, OK, on Thursday ordered Pruitt to turn over 3,000 emails to a watchdog group called the Center for Media and Democracy. The group filed a lawsuit earlier this month, alleging Pruitt violated the state’s Open Records Act by failing to make the emails public.

Judge Aletia Haynes Timmons reportedly ordered Pruitt to hand over the emails by Tuesday.

Environmental groups touched on the vote and the email controversy after the vote.

“What those emails will reveal about the relationship between Pruitt and the fossil fuel industry is anybody’s guess,” said Environmental Working Group President Ken Cook. “Today’s near party-line vote to confirm Pruitt marks a new low in the GOP’s embrace of an aggressively anti-environment agenda that caters to virtually every polluting industry in America.”

Rainforest Action Network Executive Director Lindsey Allen said the vote to confirm Pruitt “is not simply an insult to the very name of the EPA, but it is yet another signal that this administration and this Congress believe that corporate profits are more important than clean drinking water, clean air and a sustainable climate.”

Conversely, industry organizations issued congratulations to Pruitt and said they looked forward to working with him.

“Coming from the energy-producing state of Oklahoma, Mr. Pruitt understands the critical importance of implementing policies that both support our economy and protect the environment,” said Barry Russell, CEO of the Independent Petroleum Association of America. “Having a clear and fair regulatory framework is critical for independent producers, companies that work every day to safely produce the energy we all rely upon to power our everyday lives while ensuring the environment is protected, conserved, and restored in a balanced, commonsense manner.”

The American Chemical Council added that it believes that under Pruitt, the EPA will “ensure that credible science and transparency are at the heart of regulatory decisions, and that our nation’s key environmental statutes are implemented in a sensible manner.”

President Trump nominated Pruitt to lead EPA last December. The pick was controversial, in part because during his tenure as attorney general, Oklahoma joined other states in a lawsuit against EPA over its proposed Clean Power Plan.

During his confirmation hearing on Jan. 18, Pruitt laid out a vision for a more restrained EPA strictly bound by the letter of the law and Congressional intent. But he also broke with Trump by acknowledging that he thinks climate change is real. Democratic members of the Senate Environment and Public Works Committee tried to boycott Pruitt’s nomination, but Republicans on the panel suspended committee rules to overcome the boycott.