The Trump campaign has spent nearly $228,000 to cover some of the legal expenses for President Donald Trump’s personal attorney Michael Cohen, sources familiar with the payments tell ABC News, raising questions about whether the Trump campaign may have violated campaign finance laws.

Federal Election Commission records show three payments made from the Trump campaign to a firm representing Cohen. The “legal consulting” payments were made to McDermott Will and Emery — a law firm where Cohen's attorney Stephen Ryan is a partner — between October 2017 and January 2018.

It was those three payments, sources tell ABC News, that were related to Cohen’s legal defense.

Cohen has said that he did not have a formal role in the Trump campaign, and it is illegal to spend campaign funds for personal use – defined by the FEC as payments for expenses “that would exist irrespective of the candidate’s campaign or responsibilities as a federal officeholder.”

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

Legal experts told ABC News that if the payments referenced in the FEC filings are related to the Russia investigation, they likely wouldn't violate campaign finance law, as the investigation is related to the 2016 presidential campaign. If the payments are related to the Stormy Daniels matter, however, the campaign could have a problem.

It is not clear what type of legal work the payments were for, but sources familiar with the matter said that the legal work in question was not related to Daniels.

A spokesperson for the Trump campaign declined to comment on the payments. Ryan, Cohen’s attorney, did not respond to multiple requests for comment.

PHOTO: Republican presidential candidate Donald Trump speaks during a campaign stop in Orlando, Fla., Nov. 2, 2016. (Matt Rourke/AP ) More

Cohen has been Trump's personal attorney and confidant for more than a decade, but he is now facing possible legal exposure related to his work for Trump.

Ryan has represented Cohen in two key legal matters — Special Counsel Robert Mueller's ongoing investigation into possible collusion between the Trump campaign and Russian agents ahead of the 2016 presidential election, and the so-called “hush” agreement he arranged with a porn star who claimed to have had a sexual encounter with Trump in 2006.

Mueller's team has subpoenaed the Trump Organization for Russia-related documents, according to sources with direct knowledge of the matter, and congressional investigators have asked Cohen to explain his role in confidential negotiations to build a Trump Tower in Moscow at the height of the presidential campaign. Cohen told ABC News in Augusts that the Trump Organization seriously considered the proposal — which would have brought the world’s tallest building to Moscow — before eventually abandoning the plan.

The special counsel could also be interested in Cohen’s $130,000 payment to adult film actress Stormy Daniels shortly before the election to keep quiet about an alleged affair with Trump. Earlier this month, the FBI raided Cohen’s home, office, and hotel room and seized records related to the Daniels matter, after a referral from Mueller’s team was made to the U.S. Attorney in the Southern District of New York. Cohen has not been charged with a crime. He appeared in court last week, where a judge appointed a “special master” to review the seized material to determine what records, if any, fall under attorney-client privilege.

Cohen’s possible legal jeopardy doesn’t end with the investigation by the U.S. Attorney’s Office for the Southern District of New York or the special counsel. Daniels has since sued Trump and Cohen over the “hush” agreement, challenging its legitimacy because Trump never signed it, and she later added defamation charges against Cohen to the suit. In a court filing last week, Cohen revealed his plans to exercise his Fifth Amendment rights against self-incrimination in that lawsuit.

Story continues