At first glance, the preservation battle over the nearly century-old synagogue on a tree-lined block of West 93rd Street on the Upper West Side of Manhattan looks familiar, even tired. One group wants to save the stately granite building, emphasizing its history, neoclassical architecture and towering stained glass windows. Another group wants to turn it into a high-rise condominium.

But in a twist, it’s the synagogue that is fighting for the change.

Across the city, financially struggling religious congregations, facing dwindling attendance and shrinking donations, are looking for other sources of revenue. Increasingly they are turning to their most valuable asset: location, location, location (and, in some cases, the air above it).

The state attorney general’s office, whose approval is required for all sales of religious properties in New York, received 165 sale petitions in 2016; so far in 2017, it has received 124. The number of petitions has been increasing in recent years, said Doug Cohen, a spokesman for the office.

In New York City’s fevered real estate market, the pace of such deals — and opposition to them — have become especially frenetic, said Renato Matos, a lawyer who advises religious organizations on real estate transactions.