Municipal officials drew the line at the Beaux Arts building because the city owns the half-acre of land where the building stands. The Boy Scouts erected the ornate building and since 1928 have leased the land from the city for a token sum of $1 a year. City officials said the market value for renting the building was about $200,000 a year, and they invited the Boy Scouts to remain as full-paying tenants.

Jeff Jubelirer, a spokesman for the local chapter, said it could not afford $200,000 a year in rent, and that such a price would require it to cut summer-camp funds for 800 needy children.

“With an epidemic of gun violence taking the lives of children almost daily in this city, it’s ironic that this administration chose to destroy programming that services thousands of children in the city,” Mr. Jubelirer said. He added that the organization serves more than 69,000 young people, mostly from the inner city, and that its programming focuses on mentoring and after-school programs instead of camping trips.

But Stacey Sobel, executive director of Equality Advocates Pennsylvania, a gay-rights advocacy group based in Philadelphia, said: “Allowing the Boy Scouts to use this building rent free sends a message that the city approves of their policy. We are not looking to kick the Boy Scouts out. We just want them to play by the same rules as everyone else in the city.”

Ms. Sobel said the city required that any organization that rented property from it agree to nondiscriminatory language in its lease. The Boy Scouts skirted the requirement by never having had to sign a lease because they were given use of the building by city ordinance in the 1920s.

Local scout leaders said they tried hard to find a compromise between the city and their own national office, and in 2005 they seemed poised to agree on a policy statement adopted by the Boy Scouts in New York, which did not renounce the prohibition against gay members, but affirmed that “prejudice, intolerance and unlawful discrimination in any form are unacceptable.”

But last year, city officials wrote Cradle of Liberty Council officials to say that suggested policy statement could not be reconciled with Philadelphia’s antidiscrimination ordinance.