After more than two years and nearly $14 million in legal fees, a U.S. bankruptcy judge on Thursday approved the city of Stockton, Calif.’s plan to exit from Chapter 9 bankruptcy. Orrick, Herrington & Sutcliffe is raking in the lion’s share of those fees as lead counsel to the municipality.

With 298,000 residents, Stockton is the largest city in the Golden State by population to seek Chapter 9 protection. From June 2012 to April 2014, it spent nearly $14 million on bankruptcy proceedings. Orrick accrued a tab of about $10.5 million during that time and has added more since, according to the firm’s restructuring partner Marc Levinson in Sacramento, who is the city’s lead counsel on the bankruptcy proceedings.