The Trump campaign spent more than $225,000 on legal expenses for President Trump’s personal lawyer Michael Cohen, a possible violation of campaign finance laws, according to a report on Monday.

The campaign made three payments for “legal consulting” to McDermott Will and Emery, the law firm where Cohen’s attorney Stephen Ryan is a partner, between October 2017 and January 2018, ABC News reported, citing Federal Election Commission records.

Cohen has said he was not part of the Trump campaign, and the report said it is illegal to spend campaign funds for personal use, which the FEC defines as expenses “that would exist irrespective of the candidate’s campaign or responsibilities as a federal officeholder.”

“They’re on shaky legal ground,” Stephen Spaulding, chief of strategy at the watchdog group Common Cause, told ABC. “It sounds like they are really pushing the envelope. … If the campaign were to say they are campaign-related payments, then maybe it’s OK to use campaign funds. But he can’t have it both ways.”

Some legal experts told the network that if the payments are connected to special counsel Robert Mueller’s Russia investigation, they likely wouldn’t be a violation because the probe is part of the 2016 presidential campaign.

But if the payments are connected to the matter involving porn star Stormy Daniels, the campaign could have a problem.

It isn’t clear what the payments were for, but ABC said sources confirmed they weren’t related to Daniels, who alleged she had a sexual affair with Trump in 2006.

A Trump campaign spokesperson declined to comment and Ryan did not respond to requests for comment from ABC.

Ryan has represented Cohen in Mueller’s investigation into possible collusion by Trump campaign officials and in the lawsuits over the nondisclosure agreement he arranged with Daniels, whose real name is Stephanie Clifford.

FBI agents raided Cohen’s home, office and hotel room two weeks ago looking for information about a $130,000 payment Cohen made to Daniels in the weeks before the 2016 election.

Initially, Trump denied that Cohen was representing him in the Daniels legal battle, but confirmed to “Fox & Friends” last week that Cohen was involved in the case.

“He would represent me and represent me on some things, he represents me, like with this crazy Stormy Daniels deal, he represented me,” Trump told the show.