Former Texas governor Rick Perry won confirmation Thursday as President Trump’s energy secretary. Now comes the hard part.

The Senate voted 62 to 37 Thursday afternoon to confirm Perry as energy secretary, brushing aside his onetime vow to abolish the department.

The genial Republican drew less fire from Democrats during his confirmation process than other Trump nominees, but Perry now faces many of the same tough issues over regulations, the department’s activities to slow climate change and potentially deep cuts in manpower and spending.

As Texas governor, Perry presided over a boom in all kinds of energy production, including wind power and shale drilling. Many of his supporters cited that record as evidence that he could help a similarly wide variety of energy interests.

But Perry’s foes criticized his tepid acknowledgment of climate change, his strong ties to his state’s oil and gas industry, and his lack of experience with the department’s main budgetary area, the maintenance of the nation’s nuclear stockpile. And they wondered whether he will be able to protect the department’s national laboratories and other scientific research against those who would slash the budget.