Donald Trump announced Wednesday he will nominate former Gov. Rick Perry of Texas to lead the Department of Energy — an agency Perry once wanted to eliminate.

“As the Governor of Texas, Rick Perry created a business climate that produced millions of new jobs and lower energy prices in his state, and he will bring that same approach to our entire country as Secretary of Energy,” Trump said in a statement.

“My administration is going to make sure we take advantage of our huge natural resource deposits to make America energy independent and create vast new wealth for our nation, and Rick Perry is going to do an amazing job as the leader of that process,” he added.

“As the former governor of the nation’s largest energy producing state, I know American energy is critical to our economy and our security,” Perry said in a statement.

Perry, who served 14 years as Texas governor, unsuccessfully ran for president twice, in 2012 and 2016.

In a 2011 primary debate, Perry was asked which three agencies he would eliminate as president. He answered the Department of Education, and Department of Commerce, but then had an embarrassing brain freeze and forgot the third. Rep. Ron Paul tried to help, suggesting the Environmental Protection Agency as the third. Fifteen minutes later, Perry remembered his choice: the Department of Energy.

Before exiting the 2016 race, Perry branded Trump a “cancer on conservatism.”

“He is without substance when one scratches below the surface. He offers a barking carnival act that can be best described as Trumpism: a toxic mix of demagoguery and mean-spiritedness and nonsense that will lead the Republican Party to perdition if pursued,” Perry said of his Republican rival in July 2015.

“Let no one be mistaken — Donald Trump’s candidacy is a cancer on conservatism, and it must be clearly diagnosed, excised and discarded,” he added.

Trump fired back by saying, “He did a lousy job on the border,” and by sharing a picture of himself with Perry, with this caption: “@GovernorPerry in my office last cycle playing nice and begging for my support and money. Hypocrite!”