For the first time in decades, tenants at three Central Harlem apartment buildings started feeling optimistic this winter. The city planned to put an end to leaks, rats, lack of hot water-and years of unpaid taxes and bills-by taking the buildings from their negligent landlord and transferring them to a more responsible nonprofit developer, and perhaps to the tenants themselves.

A few months ago, however, the owner, the West Harlem Community Organization, decided to beat the city at its game: It sold the properties at 411, 417 and 421 Manhattan Avenue to a private company. The reason, says West Harlem: To get rid of its debt. “People weren’t paying rent, so we decided to let the buildings go,” says West Harlem’s director of management, Jo Ednee Copeland. Claiming that West Harlem made no profit on the deal, she said that the realtor only agreed to pay the nonprofit’s $838,000 debt to the city.

The legitimacy of this move, however, is under question. “There’s more than a few things wrong with this legally,” says attorney David Goldstein, a partner with the affordable housing law firm Mallin & Goldstein. The state and city laws are plain, he says: A nonprofit must receive approval from the state Supreme Court and the state Attorney General’s office before disposing of its assets. And, he adds, because the buildings are Housing Development Fund Corporations, set up by the city as nonprofit properties for low-income tenants, West Harlem likely needs the city’s permission, too.

At press time, the city Department of Housing Preservation and Development was evaluating the new owner’s plans for the property and had not yet decided how to respond.

Jerry Edelman, a managing agent for J&M Realty, which represents the owner-whose name has not been released-says his clients had no idea there could be legal problems with their purchase, and if there are, “we have no interest in participating in this building.”

The city originally had different plans for the Manhattan Avenue properties. A decade of back taxes and unpaid city fines and water and sewer bills pushed HPD to start planning to place the buildings in the third-party transfer program and give them to another nonprofit group. Tenants say they were in conversations with the Urban Homesteading Assistance Board to turn their 33 apartments into affordable cooperatives.

Copeland says the years of problems at West Harlem were not the group’s fault. “The city locked these groups into buildings that were going to fail,” she charges, adding that their only income was difficult-to-collect rent.

Tenants have contacted Legal Aid attorneys to figure out how to contest the sale, which they worry will lead to rising rents. The law may be on their side. So, says Goldstein, are ethics: “To sell it to a for-profit to clear a debt really goes against what’s needed in the community.”