President Trump’s attempt to hire former South Carolina Rep. Trey Gowdy for his legal team as he battles House Democrats over impeachment has unraveled over concerns about rules restricting his post-Congress activities, Fox News has confirmed.

Last week, it was announced that Gowdy would be joining the president’s legal team. But a source familiar with the situation told Fox News there was concern about a statute that says former lawmakers cannot communicate with or appear before their former colleagues for a year after leaving Congress.

WHITE HOUSE CONDEMNS FAKE VIDEO SHOWING TRUMP SHOOTING JOURNALISTS

Gowdy retired from Congress earlier this year, meaning his one-year restriction would be up in January 2020.

As part of his role with Trump’s legal team, Gowdy was expected to appear on television news programs — and there were concerns about whether that could be considered communicating with former colleagues in violation of the statute. A source said the president’s legal team needed Gowdy on television making the case now.

Violations of these post-Congress restrictions, intended to prevent lawmakers from lobbying immediately after leaving Congress, are considered a “felony.” But a source stressed this had nothing to do with “lobbying work” but was simply about the rules prohibiting former members of Congress from doing anything to influence lawmakers – even as an attorney for the president.

The source said Gowdy had lunch with Trump last Tuesday to discuss working as an outside counsel. There was support from both White House chief of staff Mick Mulvaney and White House Counsel Pat Cipollone for Gowdy to join the team. However, over the next couple of days, Gowdy became concerned that taking the job would run afoul of the congressional rules about "influence” and sought an outside legal opinion for guidance.

The source says Gowdy decided to err on the side of caution, and informed the Trump’s team that he would not be available to join them until Jan. 4. At the moment, he is still expected to join the team on that date – with the caveat that a lot can change between now and then.

Just last week, Trump attorney Jay Sekulow had welcomed Gowdy to the team. “I am pleased to announce that former Congressman Trey Gowdy is joining our team as counsel to the president,” he said.

Sekulow added: “I have known Trey for years and worked with him when he served in Congress. His legal skills and his advocacy will serve the president well. Trey’s command of the law is well known and his service on Capitol Hill will be a great asset as a member of our team.”

CLICK HERE TO GET THE FOX NEWS APP

Gowdy had been a Fox News contributor. A company spokesperson said Gowdy was terminated last week and is no longer serving in that capacity.