The city of Philadelphia has lost its attempt for a new trial in its years-long lease dispute with the Boy Scouts of America over the organization’s policy of banning gay men and now owes the scouts $877,000 in attorney fees for Drinker Biddle & Reath’s work on the case, according to orders Wednesday from U.S. District Court Judge Ronald L. Buckwalter of the Eastern District of Pennsylvania.

Cradle of Liberty Council Inc. and the Boy Scouts of America had occupied a city-owned building rent free since 1929. But in 2003, the city informed the scouts that their policy of banning openly gay men from membership violated the city’s nondiscrimination laws. The city said the scouts could either continue their rent-free use of the building if they changed the policy, remain in the building and pay $200,000 in rent a year and continue to discriminate, or leave the building.