Citing an “unconscionable” retainer agreement, a New York appeals court has reduced an estate’s legal bill from $44 million to what a lawyer for the winning side estimates will be a $3 million final tally.

It also is requiring three members of Graubard Miller to return $5 million in gifts they received 15 years ago from the firm’s then-client, Alice Lawrence, because they cannot prove the wealthy widow gave them the money willingly and knowingly, reports Reuters.

At issue in the appeal is a $44 million legal fee claimed by Graubard Miller under a retainer agreement signed by Alice Lawrence in 2005. The underlying representation concerned the estate of her husband, commercial real estate magnate Sylvan Lawrence, who died in 1981 leaving assets of some $1 billion.

Alice Lawrence, who was the main beneficiary, had battled with the executor of her husband’s estate over control of his holdings for more than 20 years after his death, represented by the Graubard firm since 1983. After being billed nearly $20 million by the law firm at hourly rates, she signed a revised retainer agreement in January 2005 that provided for a 40 percent contingency fee, in an effort to reduce her legal expenses. Within four months, the case settled for $111 million, and, when Lawrence balked at paying a $44 million fee, litigation resulted, the news agency recounts.

Siding with the estate of Alice Lawrence, which pursued the legal-fee battle after her death in 2008, the Appellate Division, First Department unanimously ruled on Thursday that she did not fully understand that 2005 agreement, which was “both procedurally and substantively unconscionable.” The evidence, the appellate panel said “shows that the widow believed that under the contingency arrangement, she would receive the ‘lion’s share’ of any recovery.”

The appeals court reinstated the earlier legal representation agreement between Alice Lawrence and the law firm, which provides for payment at hourly rates, Reuters reports. Attorney Daniel Kornstein, who represents the estate, estimated that Graubard’s legal bill, at hourly rates, including interest, could be as much as $3 million.

Attorney Mark Zauderer, who represents Graubard, called the amount due to his client “substantial” but declined to give a figure. The Graubard firm plans to appeal Thursday’s decision to the state’s highest court, the New York Court of Appeals.

A trial began in 2009 to determine whether the 2005 contingency-fee representation agreement between Alice Lawrence and the Graubard firm was valid, which the New York Law Journal reported on at the time.

In 2011, applying the 2005 legal services contract, then-Manhattan Surrogate Nora Anderson agreed with a referee that a reasonable contingency fee would be $15.8 million, rather than $44 million, Reuters reports.