In a rare and major victory for tenants that could sound alarm bells for developers, state prosecutors have ordered that rents be waived for 11 residents of a building on the Upper West Side, after their landlord improperly tried to convert their building into a condominium.

The tenants at 101 West 78th Street, known as the Evelyn, were featured in a recent New York Times article about the hardships they and others faced during conversions. They will live rent free for two years, starting this month, according to a deal announced last week by the state attorney general’s office. In addition, the landlord, Newcastle Realty Services, must pay more than $1.5 million in fines and legal fees for illegally inducing tenants to leave the 1886 building through buyout agreements.

“We are very pleased,” said Marjorie Magid, a retired real estate agent in her late 60s, who has lived in the same rent-stabilized one-bedroom there since 1973.

The free rents, which will compensate tenants for having to put up with dusty, noisy and potentially unsafe conditions, could result in considerable savings for the 11 affected rent-regulated and market-rate units. Based on current leases in the 44-unit building, and listings in towers nearby, the savings might total $20,000 to $80,000 per unit over the two-year period.