U.S. Energy Secretary Rick Perry has told President Donald Trump he will step down, a day before a deadline set by Democrats in the U.S. House of Representatives for him to turn over documents in the impeachment probe, according to a source familiar with the matter.

The exact date Perry would step down was not immediately known.

Perry, who was the longest serving governor of Texas and faced off against Trump in the 2016 Republican nominating contests, had said earlier this week that he had no plans to resign, denying a media report that he was expected to announce his resignation in November.

In recent weeks, Perry had found himself engulfed in the largest scandal yet to threaten Trump's presidency, with White House acting chief of staff Mick Mulvaney saying earlier on Thursday that Trump had directed Perry to work on Ukraine policy with Trump's personal lawyer, Rudy Giuliani. Trump's Ukraine policy is at the center of an impeachment inquiry being conducted by the House that has stemmed from a July 25 call in which Trump pressed Ukrainian President Volodymyr Zelenskiy to investigate the family of one of Trump's political rivals in the 2020 election.

Critics have accused Giuliani, who was not a U.S. government official, of conducting a shadow Ukraine policy.

Perry had been a rare Trump Cabinet member who was virtually free of ethics investigations that weighed on other Trump officials, but he failed to achieve a goal of subsidizing U.S. coal and nuclear energy plants facing a rash of closures.