Gov. Andrew Cuomo announced an initiative Wednesday to restore rent-regulated status to more than 50,000 apartments in the city.

State courts determined that building owners who receives a J-51 tax benefit must register the apartments under the Rent Stabilization Law and Code, giving tenants the protections of rent regulated rates and increases determined by the Rent Guidelines Board, according to Cuomo’s office.

Several landlords claimed they were exempted from offering rent regulation, but Cuomo said they will be instructed to adhere to the law in a letter.

“There will be zero tolerance for those who disregard the law and reap these benefits while denying tenants affordable housing they are obligated to provide,” he said in a statement.

More than 4,000 buildings in the five boroughs will be affected by the change, with 2,000 located in Manhattan. Half of the buildings have more than 36 apartments.

The city has lost more than 230,000 rent regulated and rent stabilized apartments over the last 30 years due to various factors, such a rise in rent above a $2,700 threshold when a unit is vacant or converted into a co-op.

Cuomo’s move was backed by Mayor Bill de Blasio’s administration.

“We’re pleased to see the State taking action to strengthen compliance with its J-51 program, and will continue working with our state partners to protect tenants in rent-stabilized apartments,” said mayoral spokesman Wiley Norvell.