Trump campaign has paid portions of Michael Cohen's legal fees: Sources Cohen has said that he did not have a formal role in the Trump campaign.

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.

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.

The Trump campaign spent more than $830,000 on legal consulting during the first three months of 2018, including one payment to the firm representing Cohen, according to FEC reports. The payments made up more than 20 percent of the total campaign expenditures.

More than $279,000 of that went to two other law firms — Harder LLP received $93,181 and Larocca, Hornik, Rosen, Greenberg & Blaha received $186,279 — that have represented President Trump and Cohen in matters related to Daniels, but sources said these particular payments were related to other matters.

The Trump campaign also paid Larocca, Hornik, Rosen, Greenberg & Blaha firm nearly $81,000 for "legal consulting" during the 2016 election cycle, FEC reports show. President Trump added Lawrence Rosen, a partner at Larocca, Hornik, Rosen, Greenberg & Blaha, to his legal team in March to handle the legal issues following the disclosure of the so-called "hush" agreement that Cohen negotiated with Daniels. Rosen did not respond to a request for comment on the payments.

The Patriot Legal Defense Fund was established earlier this year to help former Trump campaign staffers and Trump administration officials pay for legal bills associated with the ongoing Russia probes. It is unclear, however, who has benefited from the fund as it does not disclose its beneficiaries. Trump and his immediate family members are excluded from receiving money from the fund, and a source close to former national security adviser Michael Flynn told ABC News in February that he would not accept support from the fund.

In 2017, the Trump campaign also paid legal fees to the attorneys representing top aides – and family members – tangled in the ongoing Russia probes. The Trump campaign and the Republican National Committee paid $514,000 in legal fees for Donald Trump Jr, and in January, the Trump campaign paid more than $66,000 to the law firm representing former Trump bodyguard Keith Schiller, who has been a fixture at Trump’s side for decades and served as Trump’s director of Oval Office operations until September.