WASHINGTON — President Trump knew about a six-figure payment that Michael D. 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 Mr. 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 Rudolph W. Giuliani, a new addition to the president’s legal team. The interview was the first time a lawyer for the president had acknowledged that Mr. Trump had reimbursed Mr. Cohen for the payments to Ms. Clifford, whose stage name is Stormy Daniels.

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

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

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

Allen Weisselberg, the chief financial officer of the Trump Organization, has known since last year the details of how Mr. 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 Mr. Cohen was still doing “legal work” for the president in 2017, but another person familiar with the situation said that Mr. Weisselberg did not know that Mr. Cohen had paid Ms. Clifford when the retainer agreement was struck and when the payments went through.

Mr. Weisselberg’s knowledge of the retainer agreement could draw Mr. Trump’s company deeper into the federal investigation of Mr. 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 on Wednesday and Thursday, Mr. Giuliani insisted that the president had reimbursed Mr. Cohen for the $130,000 hush payment — and then paid him another $330,000, if not more — which was in direct conflict with the longstanding assertion by Mr. 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, Mr. Giuliani sought to clarify his statements by saying that he did not know whether Mr. Trump had known that some of the payments to Mr. Cohen had gone to Ms. Clifford. “It’s not something I’m aware of, nor is it relevant to what I’m doing, the legal part,” Mr. Giuliani said.

Mr. 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 email about Mr. 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 S. Mueller III; the investigation into Mr. Cohen is being run by federal prosecutors in the Southern District of New York.

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

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

Image

If Michael D. Cohen, the president’s personal lawyer, made the payment primarily out of fear that the allegations would have harmed Mr. Trump’s election prospects, then it would most likely be viewed as an illegal campaign expenditure.CreditJeenah Moon for The New York Times

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

In a written statement later in the day, Mr. 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 Ms. Clifford was motivated by the election. Mr. Giuliani said on Friday that the payment was personal in nature and “would have been done in any event, whether he was a candidate or not.” Mr. Giuliani told The Times that he had “confused” the two factors, but that it was irrelevant since Mr. Trump had repaid Mr. Cohen.

While some White House officials had insisted that Mr. Trump was pleased with Mr. 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 Mr. Trump was displeased with how Mr. Giuliani, a former New York mayor, conducted himself, and that he was also unhappy with Mr. Hannity, a commentator whose advice the president often seeks, in terms of the language he used to describe the payments to Ms. 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 Mr. Cohen or others paid to silence Ms. Clifford primarily out of fear that a public airing of her story would have harmed Mr. 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. Mr. Giuliani told The Times on Friday that the issue was “primarily” about keeping Mr. Trump’s wife, Melania, from being embarrassed by the claim, which Mr. 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. Mr. 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, Mr. Trump would have been within his rights to pay Ms. 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 of the payment. If he directed Mr. Cohen to pay it on his behalf, then that could qualify as an illegal, coordinated campaign expenditure, even if Mr. Trump later paid him back.

Any involvement by the Trump Organization would further complicate the legal picture, given that American 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 to coordinate with them.

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

After filing a lawsuit on Ms. Clifford’s behalf seeking to get out of the deal — which he has called invalid — Mr. Avenatti showed that Mr. Cohen had used his Trump Organization email at one point in arranging the payment. He also pointed to a secret document in California that a Trump Organization lawyer filed to force Ms. 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 Mr. 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, Mr. Avenatti said that any indication that still more executives at the Trump Organization knew about the effort to reimburse Mr. Cohen for the payment to Ms. 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.