Trump just shot himself in the other foot.

Trump’s efforts to deny any knowledge or involvement in paying off porn star Stormy Daniels blew up Thursday morning when he blurted out an admission that his lawyer “represented” him in the matter.

During an unhinged marathon interview with “Fox & Friends,” Trump tried to distance himself from embattled attorney Michael Cohen, whose own attorney has just announced he will plead the fifth in a civil suit.

“How much of your legal work was handled by Michael Cohen?” co-host Steve Doocy asked Trump.

“Well, as a percentage of my overall legal work, a tiny, tiny little fraction,” Trump said. “But Michael would represent me, and represent me on some things. He represents me like with this crazy Story Daniels deal, he represented me.”

Cohen has admitted to paying porn star Stormy Daniels $130,000 as part of a non-disclosure agreement, which Daniels says is not binding because Trump didn’t sign it. The actress detailed her sexual affair with Trump in a widely seen “60 Minutes” interview last month.

Several weeks ago, Trump denied knowing about the payoff when questioned aboard Air Force One. Cohen has previously insisted that he acted on his own.

“Neither the Trump Organization nor the Trump campaign was a party to the transaction,” he said in February. He has said he used his own money to “facilitate” the payment to Daniels, and Cohen’s own attorney suggested he acted to protect Trump, as his longtime “fixer,” without Trump’s knowledge.

“Because he’s that close to him, he had great latitude to handle these matters,” Cohen’s attorney, David Schwartz, said in a CNN interview in March.

But given Trump’s casual statement on Thursday, that might not be true. Trump’s stunning admission may be of interest to special counsel Robert Mueller, who is reportedly investigating Trump’s history of such payments to women.

The lie will certainly be of interest to Daniels’ attorney Michael Avenatti, who has been threatening a defamation suit against Trump.

Ever since Cohen’s office was raided by the FBI, people have been wondering if Cohen would “flip” on Trump. But it looks like a few minutes of friendly questioning on “Fox & Friends” was all it took to get Trump to flip on himself.