The rear of the home opens to a massive lawn framed by a moat-like water feature and a 400 ft. running track just below it.The rear of the home opens to a massive lawn framed by a moat-like water feature and a 400 ft. running track just below it.

A 105,000- square-foot Los Angeles mega-mansion that was listed for $295 million sold at a bankruptcy auction for $141 million, ending a 10-year-saga of soaring debt and failed dreams.

The highest bid at the end of the auction was $126 million. Laura Brady is the CEO of Concierge Auctions, which auctioned the home.

The price makes it the third most expensive home ever sold in Los Angeles, behind the $177 million purchase last year of a Malibu compound and the $165 million purchase of the former Jack Warner Estate in Beverly Hills.

The One is the most expensive home ever sold at auction in the US and the world.

Brady said that the bidding process was very competitive and that the buyer was expected.

“The One” is situated on 3.8 acres with much of the residence surrounded by a moat-like water feature.

The sale brings to a close one of the most controversial high-end real-estate projects ever. It was built by Nile Niami, the charismatic and ambitious former Hollywood producer who turned to building some of the most lavish mansions in Beverly Hills and Bel Air to sell for profit. Nile Niami claimed the property was his life mission and the most expensive home in the area.

The One is located on 3.8 acres and has 21 bedrooms and 42 bathrooms. There are views of the Pacific Ocean, downtown Los Angeles and the San Gabriel Mountains. There are seven water features on the property. There is a nightclub, a beauty salon, a bowling alley, a home theater, a 30-car garage, and an outdoor running track.

The formal dining room includes seating for 20 and an over-sized glass wine cellar for displaying large-format bottles.

Building costs went up, so did the problems. Niami's debt grew to more than 190 million dollars. Last year, the property went into bankruptcy. It was listed for $295 million and put up for auction if there was no buyer.

The hammer price is about $60 million less than the total debt on the house, which may cause some lenders to lose money on the home. Don Hankey, the biggest lender, lent more than $125 million to the project. Hankey was not the final buyer according to people familiar with the sale.

Developer Nile Niami (left) walks with CNBC’s Robert Frank (right) during a 2017 interview at “The One” while the megahome was under construction.

There are a lot of potential improvement and legal issues that will have to be dealt with by whoever purchased The One. The house has cracks in and around many of the pools and stonework, as well as signs of mold, according to the receiver's report. A local homeowner's association is challenging the construction of the building.

Real-estate executives think that the buyer may be a developer who wants to improve and change the property, get the proper permits and eventually sell it.

Niami couldn't be reached for comment Thursday.