The bankrupt New York Military Academy, a 126-year-old preparatory school on the Hudson River that counts billionaire Donald Trump among its graduates, was sold on Wednesday after a bidding war between groups backed by two China-based investors.

The winning bid of $15.83 million came from the non-profit group Research Center on Natural Conservation, backed by a principal of China-based SouFun Holdings Ltd. They beat out California-based Global Preparatory Academies, which was funded by other Chinese investors, NYMA’s lawyer Lewis Wrobel told Reuters.

NYMA, located in Cornwall, New York, owed approximately $11.5 million to $12 million to creditors, principally local real estate firm Cornwall Improvement, Wrobel said.

Global Preparatory had signed a contract to purchase the school for about $13.2 million but failed to deliver the down payment, forcing the sale. A pre-sale appraisal valued the three parcels that made up the school at $10.1 million.

Bidding moved in $100,000 increments, said Mika Saarela, dean of academics at NYMA.

NYMA filed for bankruptcy March 3 but managed to complete the semester and graduate its 15 seniors. Enrollment dropped from a high of more than 500 during the 1960s to less than 100 in the last academic year, according to sources familiar with the situation.

“Research Center on Natural Conservation, a non-profit group, indicated they want to keep NYMA as a school. We are obviously very happy with the outcome to keep the school’s mission alive,” said Saarela.

“We obviously want to get going as soon possible but our immediate plans are being worked out,” said Saarela.

Wrobel said the Global Preparatory Academies group was “funded with Chinese money. That we know for sure.”

He declined to name the investors.

The bidding war unfolded in the U.S. bankruptcy court in nearby Poughkeepsie, following an hour of talks about the status of the school’s accreditation.

“It’s a rare event to get more than what is owed. It is possible it happened in this event, but we don’t know the full amount of the debt just yet. There will now be a substantial payment to creditors,” Wrobel said.

SouFun’s broker, Richard Warshauer of Colliers International New York LLC, and Global Preparatory’s lawyer Nick Pasalides, of Reich, Reich & Reich, both declined to comment.

Saarela said there were approximately 30 people at the auction, including townspeople, alumni and school officials in addition to creditors.

Beijing-based SouFun, which operates a real estate information website, is no stranger to the area. Its non-profit affiliate purchased the nearby former mountaintop estate of Averell Harriman in 2011.