ALBANY – A contingency fee agreement that netted Graubard Miller $44 million for five months’ work was valid and must be adhered to, the state Court of Appeals ruled Tuesday.

The law firm took substantial risks by making the agreement with Alice Lawrence in January 2005, and the fact that the real estate matter on which it had long represented Lawrence unexpectedly settled in May 2005 did not make it unconscionable, the court decided.