President-elect Donald Trump made it official Wednesday, announcing his intent to nominate former Texas Gov. Rick Perry to lead the Department of Energy -- the agency Perry once famously forgot he wanted to eliminate.

The longest-serving Texas governor was thought to be Trump's top choice for the secretary job, despite Perry's tough criticism of the billionaire businessman early in the presidential campaign. In 2015, Perry called Trump's bid a "cancer on conservatism."

But as with other prominent GOP critics, Trump and Perry have moved past their disagreements. The two finalized the decision during a meeting Monday evening at Trump Tower.

“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 press release. “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.”

"It is a tremendous honor to be selected to serve as Secretary of Energy by President-elect Trump. I am deeply humbled by his trust in me,” Perry said.

Ironically, it was the Energy Department in a sense that helped derail Perry's 2012 presidential bid. During a 2011 presidential debate, he couldn’t remember the agency when he was ticking off departments he would eliminate.

"I will tell you, it is three agencies of government when I get there that are gone. Commerce, Education, and the — What’s the third one there? Let’s see. ... Oops," Perry said.

The former Texas governor is a board member for Energy Transfer Partners, which is attempting to build the Dakota Access pipeline. The construction of the pipeline sparked protests and its attempted passage through Lake Oahe in North Dakota was blocked recently by the Army Corps of Engineers over concerns it could damage the water supply in tribal lands.

The incoming Trump administration has said it plans to approve the controversial pipeline project, which was stalled in recent months by defiant protests by Native American and environmental opponents.

Perry ran for president in both the 2012 and 2016 campaigns, bowing out in both.

As secretary, he would be involved in policy decisions on increasing the nation's domestic supply of oil and investments in oil exploration research and technology.

The department plays a major regulatory role in overseeing nuclear power and natural gas. It also manages 17 national labs charged with developing science and technology to further the nation's energy sector and conduct research to spur innovation. It also maintains and secures U.S. nuclear weapons.

Perry initially endorsed Senator Ted Cruz after dropping out of the presidential race, but then turned around to support Trump.

The Associated Press contributed to this report.

