President Donald Trump's admitted reimbursement to his lawyer for a payment to Stormy Daniels days before the election could violate campaign finance laws, experts told NBC News.

Campaign finance and election law experts said Thursday that Trump's admission on Twitter that he repaid Michael Cohen the $130,000 that the lawyer had paid porn star Stormy Daniels could be used to help prove he broke campaign finance laws — even if the money didn't come from campaign funds.

The experts said Trump's defense that his reimbursement to Cohen took place through monthly retainer fees may not shield him from questions about whether the president "knowingly and willfully" — the standard for criminal campaign finance violations — accepted a loan from the lawyer and then failed to report it or the reimbursement.

"Reimbursement equals knowledge, in my opinion, legally," Paul Ryan, the vice president of policy and litigation at watchdog group Common Cause, told NBC News. "It's highly unlikely that Trump reimbursed Cohen without knowing what he was reimbursing him for."

And if Trump knew that Cohen had loaned $130,000 for something that could help the campaign — even if Trump didn't reimburse Cohen with campaign funds — the campaign would have had to report the payment, and the reimbursement to Cohen from Trump, on its Federal Election Commission reports, said Richard L. Hasen, a professor of election law and campaign finance law at the University of California-Irvine and the author of Election Law Blog.

That could open the door for prosecutors to attempt to prove that Trump "knowingly and willfully" prompted his campaign committee to file incomplete disclosures with the FEC, the experts said.

"Before last night, at least they could portray that Cohen was the lead on this and the campaign and Trump had nothing to do with it," Hasen said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"The Rudy news changes that," he added. "If Cohen made a loan to the campaign and it wasn't reported, that could be a violation by Cohen and the campaign, and Trump would also potentially be on the hook personally if he knowingly and willfully accepted that loan and the campaign didn't report it."

On the other hand, Ryan added: If Trump didn't know about the payment — which the president claimed in April in a brief conversation with reporters aboard Air Force One — he would not have committed a violation. "But Rudy Giuliani's revelation that he did know, and Trump's tweets this morning, make it highly unlikely that Trump reimbursed Cohen without knowing what he was reimbursing him for," Ryan said.

Giuliani, the former New York mayor and ex-U.S. attorney who Trump hired to join his legal team last month, first revealed on Wednesday night and Thursday morning that Trump had paid back the money to Cohen, who had said previously that he paid Daniels out of his own pocket and without Trump's knowledge.

"The president reimbursed it over several months," Giuliani said on Fox News' "Hannity" on Wednesday night, arguing that the payment didn't constitute an illegal campaign contribution, as Democrats and other critics of Trump have contended, because it didn't come from Trump campaign funds.

Michael Cohen leaves federal court in New York on April 26, 2018. Seth Wenig / AP file

Later Wednesday night, Giuliani told The New York Times that after the presidential campaign, Cohen was reimbursed $460,000 or $470,000 in $35,000-a-month retainer installments through a Trump family account for having "settled several problems" for the president.

Giuliani said he was "not clear” whether Trump was aware of the payment to Daniels at the time it was made, according to The Times. "I don't think he did (know) until now," Giuliani said. "That removes the campaign finance violation, and we have all the documentary proof for it."

Hasen, however, noted that, "Calling it a retainer means nothing."

"This is not how the world works. When you have a retainer, you still have to report what you're charging." he said. "There would be an explanation to what the money's for."

Compounding Trump's potential legal vulnerabilities were additional comments by Giuliani, who returned to Fox News Thursday morning and made clear that if Daniels hadn't been paid days before the election, a public revelation from her could have turned the presidential race upside down.

"Imagine if that came out on Oct. 15, 2016, in the middle of the last debate with Hillary Clinton,” Giuliani said on "Fox and Friends," referring to Daniels' claim she had a one-night stand with Trump in 2006. Cohen and Trump aides have denied any affair.

"Rudy's reference this morning to the debate makes the electoral purpose of this payment clearer than it already was," said Brendan Fischer, the director of FEC reform at the Campaign Legal Center, a nonpartisan group focused on campaign finance and elections.

Meanwhile, the experts agreed that even if there wasn't reason to believe Trump committed any campaign finance violations, there likely would have still been multiple violations by Cohen and the Trump campaign committee.

"One, Cohen would have violated campaign finance law by making a $130,000 payment, which is in excess of the $2,700 personal limit; two, the Trump campaign would have violated law by accepting an excessive contribution and also by failing to report it," Fischer said. "And assuming that Trump paid back Cohen, they would have violated (campaign finance) law by failing to report his reimbursement if Cohen was acting entirely independently and Trump knew nothing about it."