Rudolph W. Giuliani, the former New York mayor and a recent addition to President Trump’s legal team, said Wednesday night that Trump made a series of payments reimbursing his attorney Michael Cohen for a $130,000 settlement with an adult-film actress — despite Trump’s assertion last month that he was unaware of the payment.

“The president repaid it,’’ Giuliani told Fox News Channel’s Sean Hannity.

Trump “didn’t know about the specifics of it, as far as I know. But he did know the general arrangement, that Michael would take care of things like this, like I take care of things like this with my clients,” Giuliani said. “I don’t burden them with every single thing that comes along. These are busy people.’’

Later, Giuliani said in an interview with The Washington Post that when Cohen paid the settlement to actress Stormy Daniels, he knew he would eventually get paid back by Trump, as he was for other expenses.

Giuliani said it was his understanding that repayment from Trump came in a series of transactions after the election that he believes were completed in 2017 but could have included a reimbursement in 2018.

“The president was always going to make sure he got it back, and enough money to pay the taxes,” Giuliani said. “There probably were other things of a personal nature that Michael took care of for which the president would have always trusted him as his lawyer . . . and that was paid back out of the rest of the money, and Michael earned a fee out of it.”

Giuliani said that even though Trump reimbursed Cohen, he does not know when the president learned of the nature of the payment Cohen had made to Daniels. Giuliani said the president didn’t learn many of the details about the settlement until the past two weeks, in the wake of an FBI raid on Cohen’s office and residence.

“I don’t know if he distinguished it from other things Cohen might have done for him during the campaign,” Giuliani said, adding, “He trusted Michael, and Michael trusted him.”

Last month, a reporter on Air Force One pressed Trump about the payment, asking him, “Did you know about the $130,000 payment to Stormy Daniels?”

Trump responded, “No.”

The reporter then asked, “Then why did Michael Cohen make [the payment], if there was no truth to her allegations?”

“You’ll have to ask Michael Cohen,” Trump said. “Michael’s my attorney, and you’ll have to ask Michael.”

Another reporter asked the president, “Do you know where he got the money to make that payment?”

“No,” Trump said. “I don’t know.”

Federal prosecutors in New York are investigating Cohen’s business practices, including whether there were any crimes committed as part of a possible pattern or strategy in 2016 of buying the silence of people who could have damaged Trump’s candidacy, according to people familiar with the probe.

Cohen has said he arranged the financing of the settlement with Daniels through his home-equity line of credit. In a statement earlier this year, he did not mention any role by Trump.

“Neither the Trump Organization nor the Trump campaign was a party to the transaction with Ms. Clifford, and neither reimbursed me for the payment, either directly or indirectly,” Cohen said, using Daniels’s real name, Stephanie Clifford.

Campaign finance watchdog groups have filed complaints with the Federal Election Commission and Justice Department alleging that the then-secret payment amounted to an illegal campaign expenditure.

On Wednesday night, Giuliani argued that the payment to Daniels could not have violated campaign finance laws because no campaign money was involved.

Still, if the purpose of the payment was to help Trump’s candidacy, it could be considered a campaign contribution. Such a large expenditure by Cohen would have been far more than what he is able to donate to a candidate under federal rules. As a candidate, Trump could give unlimited sums to his campaign, but any such donations or expenditures are required to be disclosed.

Larry Noble, general counsel for the nonpartisan Campaign Legal Center, said Giuliani’s statements do not end the questions about possible campaign finance violations — and in fact could point to further concerns.

“What is surprising is that Trump recently said he knew nothing about the payment. Now, Giuliani is trying to get the stories in sync, but this still leaves several potential violations,” Noble said. “The timing of the payment is still strong evidence of it being campaign-related. And the fact that Trump paid Cohen back strengthens that argument.”

Michael Avenatti, an attorney for Daniels, said Giuliani’s comments were an indication of campaign finance violations and possibly bank fraud and money laundering.

“According to Mr. Giuliani, Mr. Trump and Mr. Cohen were co-conspirators in a felony,” he said. “Now it is time for justice to be served, and we intend to serve it.”

Trump’s attorney in the Daniels case, Charles Harder, did not respond immediately late Wednesday to a request for comment.

The disclosure by Giuliani was viewed by some White House advisers as a misstep.

“Everyone in Trump world will see this as a total unforced error and further affirmation that hiring Rudy wasn’t the best idea,” said one presidential adviser, who requested anonymity to speak candidly about the internal dynamics.

However, Giuliani told The Post that he and Trump discussed the fact that he planned to disclose that Trump reimbursed Cohen.

“Oh, yeah, yeah,” he said. “Sure, sure. He was well aware that at some point when I saw the opportunity, I was going to get this over with.”

In his Fox interview Wednesday night, Giuliani referred to the FBI agents who searched Cohen’s home, office and hotel room as “storm troopers,” a particularly harsh term, considering Giuliani once served as the U.S. attorney in New York, overseeing federal law enforcement agents.

Giuliani also offered new rationale for why Trump fired then-FBI Director James B. Comey in May 2017, saying the president was justified in removing Comey because Comey would not publicly say that the president was not under investigation as part of the FBI’s probe of Russian election interference.

“He fired Comey because Comey would not, among other things, say that he wasn’t a target of the investigation,” Giuliani said. “He’s entitled to that. Hillary Clinton got that, and he couldn’t get that. So he fired him, and he said, ‘I’m free of this guy.’ ”

Philip Bump and Beth Reinhard contributed to this report.