Donald Trump said he already has Rick Perry's replacement.

Donald Trump said Thursday that Energy Secretary Rick Perry, who has been caught up in the impeachment probe engulfing the US president, was standing down, marking the latest departure of a senior administration figure.

"Rick has done a fantastic job at Energy but it was time -- three years is a long time," Trump said, speaking in Texas. "We already have his replacement."

The announcement came a day after the publication of an interview in which Perry said that -- on Trump's orders -- he had communicated with the president's personal lawyer Rudy Giuliani over alleged corruption in Ukraine.

Trump is threatened with impeachment for pressuring the Ukrainian president to investigate his Democratic rivals ahead of the 2020 US elections.

House Democrats conducting the impeachment inquiry issued a subpoena to Perry last week, asking him to turn over documents related to his dealings with Ukraine by October 18.

Perry drove forward Trump's "energy dominance" policy, which included boosting sales of US fossil fuels to Ukraine and other countries, and he oversaw a sharp rise in production of fossil fuels.

Trump said Perry had told him of his plans to resign months ago, and that he would leave office at the end of the year.

The New York Times reported that Trump had previously considered Perry for other senior positions, including chief of staff, due to his avoidance of personal scandals that had hit many of his colleagues.

Perry, who was nominated for the role in December 2016, was one of the longest-serving cabinet members in an administration marked by high turnover.

In a Republican presidential debate in 2001, he infamously forgot the name of the department he later came to head.

He declared he would to eliminate three government agencies, but could think of only two.