Philadelphia must sell the Boy Scouts headquarters on Logan Square to the scouts and cannot entertain a competing offer from a local philanthropist and real estate entrepreneur, the city solicitor said Tuesday.

Mel Heifetz offered to buy the building for $1.5 million and donate it to a charity that, unlike the Boy Scouts, does not exclude homosexuals. But City Solicitor Shelley Smith said it was too late.

"In light of the proposed settlement, the property is under agreement and is not available to buy," she said.

In September, the city reached an agreement to sell the building to the Cradle of Liberty Council in exchange for $500,000 and forgiveness of about $960,000 in legal fees.

The legal fees stemmed from a U.S. District Court jury verdict in June. Philadelphia lost the suit, filed by the Boy Scouts after the city moved to evict the group from the city-owned building. The city was responding to the scouts' national policy prohibiting gay people from joining. Federal law allows the winning side in a civil rights case to bill the losers for costs.

Smith said the settlement was consistent with the city's nondiscrimination principles because the sale would end the city subsidy of the property. The scouts have not been paying rent on the city-owned building.

Heifetz, whose offer was first reported by the Philadelphia Daily News, said he was moved to bid to make a point about discrimination.

"I'm sure there are thousands and thousands of kids around this country that have been discriminated and thrown out of the Boy Scouts because they have been called gay," said Heifetz, a former Eagle Scout.

Heifetz owns the Alexander Inn and more than 150 Center City apartment units. Several years ago, he paid off the $274,000 mortgage of the William Way Community Center, which serves the gay, lesbian, bisexual, and transgender community.

As part of his proposal, Heifetz said he would accept a deed restriction prohibiting construction of any structure that exceeded the height and footprint of the current building.

Neighbors have been concerned that sale of the building would risk a high-rise or some other development there.

To carry out the court settlement, Councilman Darrell L. Clarke introduced legislation allowing the sale of the building. Clarke's proposed ordinance would prevent the Boy Scouts from selling the building for 10 years and would require that outside groups be able to use it for various programs, including diversity education.

On Tuesday, Clarke's director of legislative affairs, Will Carter, said the councilman planned to continue with his proposed ordinance.