President Trump directed Michael Cohen to arrange election-eve hush money paid to two women who claimed affairs with him — and knew the actions were wrong, his former personal attorney said in an interview that aired Friday.

Trump acted because he “was very concerned about how this would affect the election,” Cohen told ABC News of the allegations by porn star Stormy Daniels and former Playboy Playmate Karen McDougal.

The president has said he never ordered his former “fixer” to break the law.

But when asked if Trump knew the payments to the two women were wrong, Cohen said, “Of course,” adding that the purpose was to “help (Trump) and his campaign.”

“He directed me to make the payments. He directed me to become involved in these matters,” Cohen said in his first comments after being sentenced to three years in the slammer over campaign finance and other charges.

“First of all, nothing at the Trump Organization was ever done unless it was run through Mr. Trump. He directed me to make the payments, he directed me to become involved in these matters,” he told the network’s chief anchor George Stephanopoulos.

Cohen, 52, also said, “I knew what I was doing was wrong.”

“I stood up before the world [Wednesday] and I accepted the responsibility for my actions,” he said, adding that he was “angry at himself” for his role in the deals, but that he acted out of “blind loyalty” to Trump.

“I gave loyalty to someone who, truthfully, does not deserve loyalty,” he said.

Federal prosecutors in the Southern District of New York have implicated — but not charged — Trump in the deals reached in the final weeks before the 2016 election.

They allege that Cohen acted “in coordination with and at the direction of” the president. The feds also reached a non-prosecution agreement with American Media Inc., publisher of the National Inquirer, in which the supermarket tabloid admitted making a $150,000 payment to McDougal “in concert” with Team Trump.

The president, who has denied allegations of the affairs, claimed that the deals were private and unrelated to the campaign, and that if anything illegal occurred, it was Cohen’s responsibility.

In an interview with Fox News on Thursday, Trump said Cohen cut a deal with prosecutors to “embarrass me” in an attempt to get a reduced sentence.

Trump also sought to distance himself from Cohen’s actions.

“He was a lawyer and he is supposed to know the law. It is called ‘advice of counsel,’ and a lawyer has great liability if a mistake is made. That is why they get paid,” he tweeted Thursday.

In his ABC interview, Cohen denied trying to embarrass the president.

“It is absolutely not true. Under no circumstances do I want to embarrass the president. He knows the truth. I know the truth,” he said.

“And here is the truth: People of the United States of America, people of the world, don’t believe what he is saying. The man doesn’t tell the truth,” he said.

“And it is sad that I should take responsibility for his dirty deeds.”

When asked why he should be believed in light of his convictions for lying to Congress, tax evasion and banking crimes, Cohen said he was “done with the lying.”

“I am done being loyal to President Trump and my first loyalty belongs to my wife, my daughter, my son and this country,” he said, adding that “the special counsel stated emphatically that the information that I gave to them is credible and helpful.

“There’s a substantial amount of information that they possessed that corroborates the fact that I am telling the truth,” he added.

Cohen — who is due to report to the Otisville Federal Correctional Institution, about 70 miles northwest of New York City, on March 6 — has indicated his willingness to continue cooperating with special counsel Robert Mueller and other investigators.

He declined to answer specific questions about the Mueller probe “out of respect for process.”

“I don’t want to jeopardize any of their investigations,” he said. But when asked if he thinks Trump is telling the truth about the sweeping Russia probe, Cohen said: “No.”

Cohen said the president “is a very different individual” than the one he knew at the Trump Organization, where he worked for more than a decade.

“I think the pressure of the job is much more than what he thought it was going to be. It’s not like the Trump Organization, where he would bark out orders and people would blindly follow what he wanted done,” he said.

“There’s a system here. He doesn’t understand the system and it’s sad because the country has never been more divisive, and one of the hopes that I have out of the punishment that I’ve received as well as the cooperation that I have given, I will be remembered in history as helping to bring this country back together.

“I will not be the villain of his story,” he added.