WASHINGTON – One of President Donald Trump's fiercest allies in the House of Representatives posted a tweet Tuesday that many called a direct threat to Michael Cohen ahead of his public testimony before Congress on Wednesday.

Florida Republican Rep. Matt Gaetz posted on Twitter that Cohen's wife was "about to learn a lot" about him and accused the former Trump attorney and fixer of being unfaithful in his marriage. He later deleted the tweet and apologized to House Speaker Nancy Pelosi.

"Hey @MichaelCohen212 - Do your wife & father-in-law know about your girlfriends?" Gaetz wrote in the since-deleted tweet. "Maybe tonight would be a good time for that chat. I wonder if she’ll remain faithful when you’re in prison. She’s about to learn a lot..."

Cohen spent Tuesday behind closed doors testifying to the Senate Intelligence Committee. He will appear before the House Oversight and Reform Committee on Wednesday in a public appearance that's expected to revolve around the president's alleged infidelities, businesses and finances.

When asked by reporters on Capitol Hill about the tweet, Gaetz denied that the post was a threat or attempt to intimidate Cohen.

"This isn't witness tampering, it's witness testing," he told reporters outside his office. "When people like Michael Cohen, who's about to go to prison for lying, come before the Congress, there's an enhanced responsibility on the part of members of Congress to test that veracity, to test the truthfulness and character of the witness, and I think we ought to do it with great vigor."

Gaetz did not elaborate on his allegations that Cohen had an affair, which hasn't been previously reported, or where he obtained this information, only saying that reporters should tune in during Wednesday's hearing.

Later, however, Gaetz deleted his tweet after Pelosi said via Twitter that members' comments "on social media or in the press can adversely affect the ability of the House Committees to obtain the truthful and complete information necessary to fulfill their duties."

In response, Gaetz tweeted: "Speaker, I want to get the truth too. While it is important 2 create context around the testimony of liars like Michael Cohen, it was NOT my intent to threaten, as some believe I did. I’m deleting the tweet & I should have chosen words that better showed my intent. I’m sorry."

More:Michael Cohen plans to accuse the president of 'criminal conduct'

More:Michael Cohen, Trump's former lawyer, disbarred because of his felony convictions

Cohen pleaded guilty and agreed to provide evidence to prosecutors in two separate criminal investigations involving Trump and those around him. He admitted to illegally paying hush money to two women who claimed to have had sex with Trump and lying to Congress about the extent of negotiations for a Trump real estate project in Russia.

A person familiar with Cohen's planned testimony said he was prepared to testify about "criminal conduct" by Trump after he assumed the presidency. The person, who was not authorized to speak publicly, declined to characterize the conduct but said it happened during Trump's first year in the White House.

Lanny Davis, an attorney for Cohen, said the post "set a new low" for the congressman, adding they would not respond to his lies and "personal smears."

"We will not respond to Mr. Gaetz's despicable lies and personal smears, except to say we trust that his colleagues in the House, both Republicans and Democrats, will repudiate his words and his conduct," Davis said in a statement.

Opinion:Jordan & Meadows: Democrats put out welcome mat for a liar. We can't trust Michael Cohen.

"I also trust that his constituents will not appreciate that their congressman has set a new low — which in today’s political culture is hard to imagine as possible," Davis added.

Those on Twitter, including members of Congress, reacted quickly, many pointing that the comments could be seen as intimidating a witness and witness tampering.

Rep. Bill Pascrell, D-New Jersey, said the tweet warranted an investigation by the House Ethics Committee.

"One of my colleagues, a duly elected member of Congress, has taken to twitter to intimidate a witness," Pascrell, Jr.‏ wrote. "This is grossly unethical and probably illegal (18 USC § 1512(b)). House Ethics must investigate this disgrace and stain on our institution."

The statute Pascrell, Jr.‏ noted in his tweet is the law that states intimidating a witness is illegal.

Sen. Chris Coons, D-Delaware, said Gaetz's tweet seemed like something "out of a Mob novel" not from a member of Congress.

"That’s the sort of behavior that’s sadly become normalized in the last two years," Coons told CNN. "I think that would previously be considered absolutely shocking for a congressman to publicly engage in sort of badgering a witness in advance of their appearing."

Contributing: Kevin Johnson, USA TODAY