New legal headaches could be on the horizon for President Donald Trump after the New York attorney general sued him, his three eldest children, and the Trump Foundation.

Included in that lawsuit, filed last week, were referrals to the Federal Election Commission and the IRS.

Those entities could pursue investigations on separate fronts.

President Donald Trump could be faced with new legal headaches on multiple fronts after the New York attorney general sued him, his three eldest children, and the Trump Foundation, accusing them of "a pattern of illegal conduct" stretching more than a decade.

The lawsuit, filed last week, seeks $2.8 million in restitution plus additional penalties, as well as the dissolving of the Trump Foundation. It accuses the charitable foundation of engaging in illegal political coordination with Trump's campaign and making multiple self-dealing transactions to benefit Trump and his business interests.

New York Attorney General Barbara Underwood filed referral letters to the IRS and the Federal Election Commission identifying possible violations of federal law for the agencies to investigate.

Amy Spitalnick, the press secretary for the New York attorney general, told Business Insider the office didn't have criminal jurisdiction over nonprofit entities, which is why the attorney general filed a civil suit and sent referrals to the IRS and the FEC, with the Department of Justice copied as well.

The New York investigation alleged that the foundation raised more than $2.8 million to influence the election in coordination with senior leadership on Trump's campaign.

It highlighted a January 2016 event Trump held to raise money for veterans' causes in Iowa in lieu of participating in a Fox News primary debate. The lawsuit accuses senior campaign staff members, such as the campaign manager at the time, Corey Lewandowski, of being directly involved in the foundation's payouts to nonprofits in violation of both state and federal law.

An email from Lewandowski after that January 2016 event included in the lawsuit caught plenty of attention. Lewandowski did not respond to a request for comment from Business Insider.

—NY AG Underwood (@NewYorkStateAG) June 14, 2018

"This is really, really, really illegal," the ethics watchdog Citizens for Responsibility and Ethics in Washington tweeted on Thursday.

Paul S. Ryan, the vice president of policy and litigation at the watchdog group Common Cause, told Business Insider that such coordination could be in violation of what is known as the "soft money ban," adding that the Iowa event and the distribution of the funds raised during it "were timed to create goodwill and earned media for the Trump campaign in the week leading up to the Iowa caucuses."

The lawsuit said Trump's "wrongful use of the Foundation to benefit his Campaign was willful and knowing," which is the standard by which a campaign-finance violation could be investigated as a criminal matter.

Corey Lewandowski. Jeff Swensen/Getty Images Larry Noble, the senior director and general counsel at the Campaign Legal Center, told Business Insider he saw "potential legal problems" involving both campaign-finance law and the Internal Revenue Code.

"If the campaign is directing the charity's contributions to other organizations to assist the campaign, it would violate the campaign-finance law prohibition on corporate expenditures to influence elections and the IRS ban" on charities "intervening in elections," said Noble, a former general counsel for the FEC.

What could happen with the IRS

Other matters appear to pertain directly to the IRS.

The New York suit alleged that the foundation entered into at least five self-dealing transactions that benefitted Trump or his businesses, including more than $250,000 in payments to settle claims against his Mar-a-Lago resort and the Trump National Golf Club and to purchase a painting of himself displayed at his Miami golf club.

Included in the lawsuit was what looked like a note from Trump to a top Trump Organization official instructing the official to use $100,000 in charity money to pay off a Florida legal settlement.

The Washington Post reporter David Fahrenthold said he discussed the lawsuit with a former IRS official and described the official as being "amazed at the range of the violations here."

In a tweet, Fahrenthold quoted the former official as saying: "They hit an extraordinary catalog of how *not* to run a private foundation. There's little else he could have done that would have made it worse."

The New York Times reported last week that if the IRS does decide to investigate the foundation, it could bring forth civil penalties or criminal charges. And similar behavior, The Times said, has led to federal prosecutions.

The Times cited an instance in 2007 in which Vincent Fumo, then a Democratic Pennsylvania state senator, was indicted by the Justice Department on charges that he misused a charity run by a former staffer. Fumo was convicted and sentenced to four years in prison.

The IRS has several tools at its disposal. It could seek to revoke the Trump Foundation's tax-exempt status, which could be implemented retroactively, The Times said. That would stick it with a tax bill going back years.

The New York attorney general's lawsuit noted that Trump said in the foundation's signed tax returns that it "did not carry out political activity" and "did not engage in transactions with interested parties." That could prove material in the IRS's determination of whether to pursue charges of filing a false tax return, attorneys who have worked on such cases told The Times.

"If I were representing someone who had committed these acts, who was not president of the United States, I would be looking to negotiate a resolution," Jenny Johnson Ware, a criminal tax attorney in Chicago, told The Times.

Trump's nominee to lead the IRS, Charles Rettig, is awaiting Senate confirmation.