Did Rudy Giuliani prompt new legal headaches for Trump?

Giuliani's comments are raising eyebrows among legal experts.

Daniels, whose real name is Stephanie Clifford, claims she had a sexual encounter with Trump in 2006.

Appearing to contradict repeated denials from the White House, Trump himself, and his legal team that the president was aware of the payment to Daniels, Trump sent a tweet out on Thursday reiterating Giuliani’s characterization of his reimbursement to Cohen.

Legal experts told ABC News that if Trump reimbursed Cohen for the six-figure payoff just days before the 2016 election, he might have violated federal election laws if the payoff was determined to be an unreported campaign contribution. If Daniels' settlement is deemed a "campaign contribution" then Trump might have also violated a law that prohibits election donations in the name of someone other than the actual donor, a practice known as a "straw donor" scheme.

But whether any laws were broken hinges first on whether the alleged hush money was paid primarily for personal reasons – perhaps to hide allegations of an affair from Trump’s wife, protect Trump’s name, or help his business image – or to help Trump win the election, which would make it a “campaign contribution.”

Under federal election laws, a payment is not a campaign contribution if it “would have been made irrespective of the candidacy.”

It was a factual question and the jury deadlocked. Similar questions could arise from the Daniels payment.

Trump appeared to take legal heat off Cohen, and deflect it onto himself, when he admitted to the reimbursement.

If the payment was a “campaign contribution” by Cohen, then he could be found to have violated an election law that caps direct federal campaign donations at $2,700 per election, or $5,400 for the combined primary and general elections.

But if it was Trump’s money, there would be no cap because these laws allow the candidate to donate unlimited amounts to his or her own campaign, as long as it is reported.

Ann Ravel, a former Commissioner of the Federal Election Commissions, said that even if it was Trump’s money, Cohen could still have broken the law by making an excessive loan to the campaign before he was reimbursed.

The president claimed in tweets on Thursday that he never had an affair with Daniels but paid for her silence anyway to stop her “false and extortionist accusations.”

...despite already having signed a detailed letter admitting that there was no affair. Prior to its violation by Ms. Clifford and her attorney, this was a private agreement. Money from the campaign, or campaign contributions, played no roll in this transaction. — Donald J. Trump (@realDonaldTrump) May 3, 2018

The FEC – which has the authority to bring a civil case and impose fines – declined to comment to ABC News about whether any investigation was pending.

The Justice Department can bring a criminal case for election law violations if they are made “knowingly” and “willfully.” On April 9, federal agents in New York seized records from Cohen’s office, home and hotel room that reportedly included documents related to the Daniels payment. It remains unclear whether or not the Justice Department is investigating the issue.