President-elect Donald Trump has chosen former Texas Gov. Rick Perry — who famously once forgot that he wanted to abolish the Energy Department — to be secretary of energy, the transition team announced early Wednesday.

Former Texas Gov. Rick Perry speaks during a news conference in Austin, Texas, on Feb. 24, 2016. Eric Gay / AP file

“As the Governor of Texas, Rick Perry created 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.

Perry, a rival of Trump's during the Republican presidential nominating campaign, said it was a "tremendous honor" to be tapped for the post.

Perry had endorsed Sen. Ted Cruz, a fellow Texan during the GOP primary. Before he left the race, he denounced Trump's candidacy as "a cancer on conservatism" and criticized Trump as a "barking carnival act."

By May, however, as it became clear that Trump was likely to win the Republican nomination, Perry had retreated from his criticism, saying that "I will be open to any way I can help" and that "I believe that Donald Trump should be our guy."

Perry also ran for president in 2012, which led to a gaffe during a debate in November 2011 in which he forgot that he had identified the Energy Department — the agency Trump now wants him to head — as one of three Cabinet departments he would eliminate. The temporary memory loss became known as Perry's "oops" moment.

As governor, Perry championed the oil industry, questioning science that shows that greenhouse gas emissions contribute to climate change and deriding what he called "the secular carbon cult."

At a presidential town hall in 2011, he said, "I think there are a substantial number of scientists who have manipulated data so that they will have dollars rolling into their projects."

Perry is also likely to be questioned during confirmation hearings about the Dakota Access Pipeline. He serves on the board of directors of Energy Transfer Partners, the company building the controversial project near the Standing Rock Sioux reservation.