Landlords who try to harass their rent-regulated tenants into abandoning their homes will be publicly shamed and hit with heavier fines, under a bill approved unanimously Tuesday by the New York City Council.

The bill, passed 49-0, doubles the maximum fine a landlord can face, to $10,000 from $5,000 per violation, in housing court. The city's Housing Preservation and Development agency would also be required to post online the names of the harassing landlords, who often can start charging market rates once the apartments are vacated.

"We will truly be shaming those landlords," Councilwoman Margaret Chin (D-Manhattan) said.

The law takes effect 180 days after the mayor signs it, which is expected. HPD spokesman Eric Bederman said the agency backs the bill.

Frank Ricci, of the Rent Stabilization Association, a landlord trade group, opposed the bill as "totally unnecessary." He cited city figures that most complaints of tenant harassment are dismissed, discontinued or withdrawn. Chin said that's because it's difficult for tenants to win legal challenges against landlords.