President-elect Donald Trump’s charitable foundation has admitted to the Internal Revenue Service that it violated a legal prohibition against “self-dealing,” which bars nonprofit leaders from using their charity’s money to help themselves, their businesses or their families.

The admission was contained in the Donald J. Trump Foundation’s IRS tax filings for 2015, which were recently posted online at the nonprofit-tracking site GuideStar. A GuideStar spokesman said the forms were uploaded by the Trump Foundation’s law firm, Morgan, Lewis & Bockius.

The Washington Post could not immediately confirm if the same forms had actually been sent to the IRS.

In one section of the form, the IRS asked whether the Trump Foundation had transferred “income or assets to a disqualified person.” A disqualified person, in this context, might be Trump — the foundation’s president — or a member of his family or a Trump-owned business.

The foundation checked yes.

For 2015, the Trump Foundation checked “yes” when asked whether it had transferred “income or assets to a disqualified person” — which in this context might be Trump, a member of his family or a Trump-owned business — and checked “yes” again when asked if it had engaged in any acts of self-dealing in prior years. For 2014, The foundation answered “no” to these questions.

Another line on the form asked whether the Trump Foundation had engaged in any acts of self-dealing in prior years. The Trump Foundation checked yes again.

Such violations can carry penalties including excise taxes, and the charity leaders can be required to repay money that the charity spent on their behalf.

During the presidential campaign, The Post reported on several instances in which Trump appeared to use the Trump Foundation’s money to buy items for himself or to help one of his for-profit businesses.

But the new Trump Foundation tax filings provided little detail, so it was unclear if these admissions were connected to the instances reported in The Post.

The Trump Foundation tax forms did not, for instance, describe any specific acts of self-dealing. They also did not say whether Trump had paid any penalties already. That kind of detail would be submitted on a separate IRS form, which was not included in the information posted online by GuideStar.

The New York attorney general’s office is investigating Trump’s charity, following up on reports in The Post that described apparent instances of self-dealing going back to 2007. A spokesman for Attorney General Eric Schneiderman declined to comment, other than to say “our investigation is ongoing.”

The IRS also did not immediately respond. That agency has not said if it is investigating the president-elect’s charity.

The Trump Foundation has existed since 1987. This appeared to be the first time that it had admitted committing such a violation.

Philip Hackney, who formerly worked in the IRS chief counsel’s office and now teaches at Louisiana State University, said he wanted to know why the Trump Foundation was now admitting to self-dealing in prior years — when, in all prior years, it had told the IRS it had done nothing of the kind.

“What transactions led to the self-dealing that they’re admitting to? Why weren’t they able to recognize them in prior years,” Hackney said. He said that, since the prior years’ returns were signed by Trump, that opened the president-elect to questions about what he had missed and how.

During the presidential campaign, The Post revealed several instances — worth about $300,000 — where Trump seemed to have used the Trump Foundation to help himself. From 2009 until this year, the charity was funded exclusively with other people’s money, an arrangement that experts say is almost unheard of for a family foundation.

In two cases, The Post reported, the Trump Foundation appeared to pay legal settlements to end lawsuits that involved his for-profit businesses.

In one case, Trump settled a dispute with the town of Palm Beach, Fla., over a large flagpole he erected at his Mar-a-Lago Club. The town agreed to waive $120,000 in unpaid fines if Trump’s club donated $100,000 to Fisher House, a charity helping wounded veterans and military personnel. The Trump Foundation paid that donation instead — effectively saving his business $100,000.

In another, Trump’s golf course in New York’s Westchester County was sued by a man who had won a $1 million hole-in-one prize during a tournament at the course. The man was later denied the money because Trump’s course had allegedly made the hole too short for the prize to be valid.

The lawsuit was settled, and details on that final settlement have not been made public. But on the day that the parties told the court that their lawsuit had been settled, the Trump Foundation donated $158,000 to the unhappy golfer’s charity. Trump’s golf course donated nothing.

In three other cases, Trump’s foundation paid for items that Trump or his wife purchased at charity auctions. In 2012, Trump bid $12,000 for a football helmet signed by then-Denver Broncos quarterback Tim Tebow. In another case from 2007, Trump’s wife, Melania, bid $20,000 on a six-foot-tall portrait of Trump painted by “speed painter” Michael Israel during a gala at Mar-a-Lago. And in 2014, Trump bid $10,000 to buy a four-foot painting of himself by artist Havi Schanz at another charity gala.

In all three cases, the Trump Foundation paid the bill. Tax experts said that, by law, the items had to be put to charitable use. Trump’s representatives have not said what became of the helmet or the $20,000 portrait.

The $10,000 portrait was, however, located by Post readers, following coverage of the Trump Foundation. It was hanging on the wall of the sports bar at Trump’s Doral golf resort, outside Miami.

In September, a Trump campaign spokesman rejected the idea that Trump had done anything wrong, by using his charity’s money to buy art for his bar. Instead, spokesman Boris Epshteyn said, the sports bar was doing the charity a favor by “storing” its art free of charge.

Tax experts said that this argument was unlikely to hold water.

“It’s hard to make an IRS auditor laugh,” Brett Kappel, a lawyer who advises nonprofit groups at the Akerman firm, told The Post then. “But this would do it.”

In the new 2015 tax filing, the Trump Foundation acknowledged for the first time that it owned these items. But it listed market values far below what the foundation had paid: The helmet was valued at $475, the portrait purchased for $20,000 was valued at $700, and the portrait purchased for $10,000 was valued at $500.

The tax filing did not give any details about where these items are or what charitable use Trump has in mind for them.

The Trump Foundation’s tax filing also shows that — for the first time in six years — the foundation received a donation from an entity controlled by Trump himself.

It lists a donation of $566,370 from the Trump Corporation, an entity 100 percent owned by Trump himself. It also lists a $50,000 gift from Trump Productions, a Trump-owned business that produced “The Apprentice.”

Previously, the last donation to the foundation from Trump or one of his businesses had come in 2008. Trump’s spokesmen did not respond to a question about the reason for these new gifts.

In addition, the Trump Foundation reported a $150,000 gift from the foundation of Viktor Pinchuk, a powerful Ukrainian steel magnate. That was the first such gift from him.

Pinchuk, who supports closer ties between Ukraine and Western nations, had also pledged large donations to the foundation of Trump’s presidential opponent, Democratic nominee Hillary Clinton. Those donations, pledged to the Clinton Foundation while Clinton was secretary of state, raised questions about whether she had conflicts of interest when she met with her family foundation’s donors.

A spokesman for Pinchuk’s foundation said that the gift was made as part of an agreement for Trump to speak — via video link — to a conference Pinchuk organized in September 2015. The conference, called the Yalta European Strategy annual meeting, was held in Kiev. At the time of his 20-minute speech, titled “How New Ukraine’s Fate Affects Europe and the World,” Trump was already a presidential candidate.

Marc S. Owens, the former head of the IRS nonprofit division, noted that this was a rare contribution to the Trump Foundation from overseas. The only other foreign gifts were small ones from New Zealand and Canada in 2006 and 2008. And it was certainly the first from a foreigner who could seek to influence the foreign policy agenda of a President Trump.

“The contribution points out a potential way for foreign donors to align themselves with [Trump],” Owens said.

So far, Trump has said nothing about how he will run his foundation when he takes office — or what he will do to avoid potential conflicts of interest involving Trump Foundation donors.

In contrast, when she was preparing to take office as secretary of state in 2009, Clinton was closely questioned about the operations of the global charity founded by her husband. As a result, the president of the Clinton Foundation signed a memorandum of understanding with the Obama administration that placed certain restrictions on its activities, notably limiting some donations from foreign governments.

The agreement was criticized by Republicans during the campaign for loopholes, and the Clinton Foundation has also acknowledged at least one failure to fully uphold its terms. But the document showed an understanding that some additional transparency and regulations were needed while Clinton held public office.

“I will certainly do everything in my power to make sure that the good work of the foundation continues without there being any untoward effects on me and my service and be very conscious of any questions that are raised,” Clinton said during her 2009 confirmation hearing. “But I think that the way that this has been hammered out is as close as we can get to doing something that is so unprecedented that there is no formula for it, and we’ve tried to do the very best we could.”

The Post was first alerted to the 2015 tax filing by Citizens for Responsibility and Ethics in Washington, a liberal watchdog group. In a written statement, CREW spokesman Jordan Libowitz said many questions remained to be answered.

“Why were the Trumps unable to provide locations of the Foundation’s assets like paintings and football helmets . . . when they clearly remain in the possession of the Foundation? What assets do [they] admit to transferring to a ‘disqualified person?’ ” Libowitz wrote. “It’s pretty clear at this point that the IRS needs to investigate.”

In all, the 2015 tax filing shows that the Trump Foundation took in $781,000 and gave away $896,000 in grants during 2015. That left it with $1.1 million at year’s end, slightly down from the year before.

An early look at its outgoing grants showed a familiar pattern: Trump gave to a smattering of New York and Florida charities, plus a few connected to friends and business partners. Also, as he entered the presidential race, he gave to several nonprofit organizations connected with conservative causes.

One of them was Project Veritas, the group run by conservative provocateur James O’Keefe, which has used hidden-camera stings to target liberal groups. Stephen Gordon, of Project Veritas, said that its point of contact had been Corey Lewandowski, Trump’s one-time campaign manager.

He said they had a brief meeting with Trump in 2015 at Trump Tower. Trump gave $10,000 from his foundation to the group, which is an IRS-certified nonprofit organization.

“We showed him a couple of videos. He thought that was really cool. And we walked out with a check. It was a typical donor meeting,” Gordon recalled.