President Donald Trump's pick to lead the Environmental Protection Agency has been confirmed by the Senate.
Scott Pruitt has been a fierce critic of the agency he will now be running.
A judge in Oklahoma on Thursday ordered him to release, by Tuesday, emails he exchanged with oil and gas executives while Oklahoma attorney general.
In a contentious confirmation process, Democrats boycotted an earlier vote over his email refusal and claimed he was too close to energy companies.
They held the Senate floor through the night to put pressure on the chamber to delay the confirmation vote until the emails were handed over.
But the Republican-controlled Senate voted in favour of his confirmation by 52 to 46.
Mr Pruitt had refused to hand over the emails, at the request of a liberal watchdog, for more than two years.
Environmental groups said they feared he will loosen the regulations on energy companies.
During his confirmation hearing he said he disagreed with Mr Trump saying climate change was a hoax, but he has previously cast doubt on the overwhelming evidence that changes in the earth's temperature are down to humans.
Matt McGrath, BBC environment correspondent
Mr Pruitt is perhaps the most controversial appointment in the history of the EPA - the Oklahoma attorney general has spent years fighting the role and reach of the organisation he now heads.
Hundreds of former EPA staff members wrote an open letter against his appointment, some calling him an "unqualified extremist".
Environmental campaigners see him as an oil and gas industry stooge who is "lukewarm" on the threat posed by climate change - they fear that hard-won environmental regulations will be overturned.
Key among them is the 2009 ruling that greenhouse gas emissions endanger both the environment and public health. This underpinned many of the actions taken by President Obama to curb CO2.
With Mr Pruitt in place, it's likely that President Trump will rapidly push ahead with orders to overturn Obama's Clean Power Plan and his "Waters of the US" rule, something conservatives also see as an over-extension of federal power.
The 48-year-old will probably attempt to cut through the "regulatory rampage" that Republicans believe the EPA has embarked on over the past eight years - but he needs to be wary of over-reach.
President Reagan appointed Anne Gorsuch Burford to reform the EPA back in 1981 - but after failed attempts to downsize, she was out on her ear two years later.
Mr Pruitt's confirmation means that Mr Trump has filled 14 of his 22 Cabinet posts.
He has blamed Democratic obstructionism for not filling more of his key jobs by now.