– President Donald Trump knew about a six-figure payment that Michael Cohen, his personal lawyer, made to a pornographic film actress several months before he denied any knowledge of it to reporters aboard Air Force One in April, according to two people familiar with the arrangement.

How much Trump knew about the payment to Stephanie Clifford, the actress, and who else was aware of it have been at the center of a swirling controversy for the past 48 hours touched off by a television interview with Rudy Giuliani, a new addition to the president’s legal team. The interview was the first time a lawyer for the president had acknowledged that Trump had reimbursed Cohen for the payments to Clifford, whose stage name is Stormy Daniels.

It was not immediately clear when Trump learned of the payment to Clifford, which Cohen made in October 2016, at a time when media outlets were poised to pay her for her story about an alleged affair with Trump in 2006. But three people close to the matter said Trump knew that Cohen had succeeded in keeping the allegations from becoming public at the time the president denied it.

Clifford signed a nondisclosure agreement, and accepted the payment just days before Trump won the 2016 presidential election. Trump has denied he had an affair with Clifford and insisted that the nondisclosure agreement was created to prevent any embarrassment to his family.

Giuliani said this week that the reimbursement to Cohen totaled $460,000 or $470,000, leaving it unclear what else the payments were for beyond the $130,000 that went to Clifford. One of the people familiar with the arrangement said that it was a $420,000 total over 12 months.

Allen Weisselberg, chief financial officer of the Trump Organization, has known since last year the details of how Cohen was being reimbursed, which was mainly through payments of $35,000 per month from the trust that contains the president’s personal fortune, according to two people with knowledge of the arrangement.

One person close to the Trump Organization said people with the company were aware that Cohen was still doing “legal work” for the president in 2017, but another person familiar with the situation said Weisselberg did not know Cohen had paid Clifford when the agreement was struck and when the payments went through.

Weisselberg’s knowledge of the retainer agreement could draw Trump’s company deeper into the federal investigation of Cohen’s activities, increasing the president’s legal exposure in a wide-ranging case involving the lawyer often described as the president’s “fixer” in New York City.

In interviews Wednesday and Thursday, Giuliani had insisted that the president had reimbursed Cohen for the $130,000 hush payment — and then paid him another $330,000, if not more — which was in direct conflict with the long-standing assertion by Trump and the White House that he did not know about the hush money or where it came from.

In an interview with the New York Times on Friday, Giuliani sought to clarify his statements by saying that he did not know whether Trump had known that some of the payments to Cohen had gone to Clifford. “It’s not something I’m aware of, nor is it relevant to what I’m doing, the legal part,” Giuliani said.

Giuliani acknowledged that “politically,” it could be troublesome. “Politically, everything matters, but I don’t see a problem here, at least not” legally, he said.

A lawyer for the Trump Organization declined to comment, and a spokeswoman for the organization did not respond to an e-mail about Weisselberg.

The president has said that he would view any investigation into his finances or those of his family as “a violation,” though he was referring to the investigation into Russia by the special counsel, Robert Mueller; the investigation into Cohen is being run by federal prosecutors in the Southern District of New York.

The payment to Clifford is a part of that investigation. The circumstances surrounding it had become all the murkier this week after Giuliani gave an explanation of how the funds to Clifford were accounted for that contradicted all those that came before it.

After initially appearing to back Giuliani’s assertions in a series of Twitter messages Thursday, Trump reversed course Friday, after a series of headlines suggesting that the president had lied about knowing of the hush payment. In remarks to reporters Friday, Trump criticized Giuliani and said he would eventually “get his facts straight.”

“Virtually everything said has been said incorrectly, and it’s been said wrong, or it’s been covered wrong by the press,” Trump told reporters, though he excused Giuliani by explaining he had “just started a day ago.”

In a written statement later in the day, Giuliani said that he had not been “describing my understanding of the president’s knowledge.” And he reversed a previous suggestion that the payment to Clifford was motivated by the election. Giuliani said Friday that the payment was personal in nature and “would have been done in any event, whether he was a candidate or not.” Giuliani told The Times that he had “confused” the two factors, but that it was irrelevant since Trump had repaid Cohen.

While some White House officials had insisted that Trump was pleased with Giuliani’s performance on Fox News in an interview with Sean Hannity on Wednesday night, two people close to the president painted a different picture. They said that Trump was displeased with how Giuliani, a former New York mayor, conducted himself, and that he was also unhappy with Hannity, a commentator whose advice the president often seeks, in terms of the language he used to describe the payments to Clifford.

The nature of the payments is significant because of campaign finance laws that regulate who may contribute to candidates and how much they can give.

If Cohen or others paid to silence Clifford primarily out of fear that a public airing of her story would have harmed Trump’s election prospects — rather than to keep it from his family for personal reasons — then the payment would most likely be viewed as an illegal campaign expenditure. Giuliani told The Times on Friday that the issue was “primarily” about keeping Trump’s wife, Melania, from being embarrassed by the claim, which Trump has maintained was false.

But if investigators determine that the hush payment was in effect a campaign expenditure, then how the funds were distributed could take on added legal significance. Cohen had been careful to say that neither the campaign nor the Trump Organization was involved in the deal or any effort to reimburse him.

Under campaign finance law, Trump would have been within his rights to pay Clifford himself as a way to protect his presidential prospects — though he would have had to have formally made note of it in his public campaign filings, which had no accounting for the payment. If he directed Cohen to pay it on his behalf, then that could qualify as an illegal, coordinated campaign expenditure, even if Trump later paid him back.

Any involvement by the Trump Organization would further complicate the legal picture, given that U.S. election law is strictest of all when it comes to corporate involvement with political campaigns. Businesses are not allowed to donate directly to campaigns or coordinate with them.

Clifford’s lawyer, Michael J. Avenatti, has been arguing for months that Trump’s company was more involved in the arrangement than Cohen had been letting on.

After filing a lawsuit on Clifford’s behalf seeking to get out of the deal — which he has called invalid — Avenatti showed that Cohen had used his Trump Organization e-mail at one point in arranging the payment. He also pointed to a secret document in California that a Trump Organization lawyer filed to force Clifford into arbitration this year.

At the time, the Trump Organization said that the lawyer, Jill A. Martin, who works in California, had acted in a personal capacity to help Cohen, who needed assistance with the initial arbitration filing from someone licensed in the state. The Trump Organization had said that “the company has had no involvement in the matter.”

In an interview, Avenatti said that any indication that still more executives at the Trump Organization knew about the effort to reimburse Cohen for the payment to Clifford could lead to further investigation of the Trump family business.

“There’s no question it opens up another avenue of inquiry into the depths of the involvement of the Trump Organization,” he said.