Under the deal, the buyer will allow Gabor, 96, and von Anhalt to remain in the home for at least three years, or until the actress dies, and pay them $325,000 a year, Gabor’s publicist John Blanchette told Reuters.

Gabor, the Hungarian-born star of 1950s films “Moulin Rouge” and “Lili”, has been in and out of hospital since breaking her hip in 2010 and having her leg amputated in January 2011.

Von Anhalt put the house up for sale at an asking price of $15 million two years ago, citing financial difficulties and the costs of medical bills for Gabor.

“This decision is going to make her very happy,” von Anhalt told reporters after Friday’s court hearing. “Hopefully she will be with us for more than three years. Her mother lived to be 102.”

Gabor’s hillside home is in one of the most exclusive areas of Los Angeles. The grounds were used to film scenes for Ben Affleck’s Oscar-winning movie “Argo” as well as an upcoming HBO film about the life of late entertainer Liberace.

Gabor has remained bedridden for years, but was in better health recently than previous years and enjoyed a 96th birthday party with friends.