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.
But the Republican-controlled Senate voted in favour of his confirmation by 52 to 46.
Mr Pruitt had refused to hand over the emails for more than two years.
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.