One of President Donald Trump’s golf courses paid back more than $158,000 to Trump’s charitable foundation this year, reimbursing the charity for money that had been used to settle a lawsuit against the club, according to a new tax filing.

The March 2017 payment came after New York Attorney General Eric Schneiderman, a Democrat, launched an investigation into how the Donald J. Trump Foundation collects and disburses funds. The inquiry is ongoing.

The Washington Post reported last year that Trump had used the charity for questionable purposes, including to make a political contribution, to settle legal matters involving his for-profit companies and to buy a large portrait of himself that he hung at one of his golf resorts.

Amanda Miller, a spokeswoman for the Trump Organization, said Monday that Trump’s foundation is cooperating with the investigation. During the probe, the foundation can neither raise money or give it away.

The charity confirmed in its new filing what Trump said last December - that he plans to shut down the foundation once the attorney general’s probe is complete.

The reimbursement by Trump National Golf Club in Westchester County, New York, was detailed in the foundation’s 2016 tax filing, which was released Monday by the nonprofit-tracking site GuideStar. Along with that payment, the foundation received another $62,184 in reimbursements from unidentified sources, the document shows.

The filing “definitely reflects an effort to get the house in order, so to speak, before shutting down,” said Marcus S. Owens, a former IRS official who once headed the agency’s nonprofits division.

The filing, which covers the 2016 calendar year, listed Trump as the charity’s president, noting that he worked 0.5 hours per week on charity business. His children Ivanka, Donald Jr. and Eric were listed as directors.

The reimbursement from the golf course relates to payment the Trump Foundation made to settle a lawsuit against the Westchester club.

The case began in 2010, when a man named Martin Greenberg was playing in a charity tournament at the course. There was a $1 million prize for a hole-in-one on the 13th hole.

Greenberg aced the hole. But then, after a celebration, he was told he couldn’t claim the prize. The rules said the hole had to be a certain length. Trump’s club had allegedly made it too short.

Greenberg sued the golf club. The parties settled. On the day that the parties informed the court they had settled their case, a $158,000 donation was sent to the Martin Greenberg Foundation.

That money came from the Trump Foundation, according to the tax filings of both Trump’s and Greenberg’s foundations.

Tax experts said the incident raised questions about “self-dealing” - a practice prohibited in charities, where a charity’s leaders use nonprofit money to help themselves or their businesses.

In its latest tax filing, the Trump Foundation said the golf course had raised the $158,000 largely by auctioning off a membership. But after raising that money, it routed the payment through the Trump Foundation.

The foundation said in the filing that the golf course had repaid the money with interest, adding that Trump himself had been unaware “that making the payment . . . would have even the possibility of being incorrect.”

Of the additional reimbursements, it appears that $25,000 relates to a payment that the Trump Foundation made in 2013 to a Florida political committee called “And Justice For All.” The committee supported state Attorney General Pam Bondi (R).

Charities are not allowed to give to political committees.

After The Post reported the gift to Bondi’s group last year, Trump repaid the money and paid a $2,500 penalty tax to the IRS.

The sources of the remaining $37,184 in reimbursements received by the foundation in 2016 were not disclosed in the filing.

Miller, the Trump Organization spokeswoman, did not respond to a question about the payments Monday.

Owens said the Trump Foundation’s filing leaves other questions unanswered. Nonprofits are prohibited from participating in political campaigns. But the most prominent thing the Trump Foundation did in 2016 was to take part in a TV event advertised by Trump’s political campaign, in which Trump held a fundraiser for veterans while skipping a Fox News-run GOP debate.

Trump brought in more than $2 million to his foundation at that event, and gave some of the proceeds away during his presidential campaign rallies.

The Trump Foundation’s tax return deals with that issue only obliquely, noting that the fundraiser was “held by a candidate for public office.” It does not mention that this candidate was Trump himself, the foundation’s founder and namesake.

Trump “used the foundation as a prop in the political campaign,” Owen said. “They don’t say anything about it.”

The filing shows the Trump Foundation took in $2,865,683 in donations during 2016, mostly through that fundraiser. The biggest donors were Phil Ruffin, a casino magnate who is Trump’s partner in a Las Vegas hotel, and Laura Perlmutter, wife of Marvel Entertainment Chairman Ike Perlmutter. Both gave $1 million.

The donations to the foundation last year totaled the second-largest amount it had received in any year since its creation in 1987. None of the money came from Trump himself.