The New York Attorney General has no authority to recoup $150 million in fees Ernst & Young earned from Lehman Brothers Holdings in the years leading up to the bank's 2008 collapse, a judge ruled on Wednesday.

The state is seeking the fees as part of a lawsuit against Ernst & Young over its auditing of Lehman Brothers. The lawsuit accuses the firm of assisting Lehman in accounting fraud.

"The disgorgement remedy is not available," New York state Supreme Court Justice Jeffrey Oing said, granting Ernst & Young's motion to dismiss the state's claim to the fees.

The case, which was filed in 2010, continues. Lehman filed for bankruptcy protection on September 15, 2008, in the midst of the financial crisis.

The case is People of the state of New York v. Ernst & Young, New York state Supreme Court, New York County, No. 451586/2010.

(Reporting by Karen Freifeld; Editing by Eddie Evans)