Landlords in New York state may soon have to face criminal charges if they try to force rent-regulated tenants from their apartments by intentionally creating conditions deemed to be uninhabitable, unsafe or disruptive, whether or not those conditions caused an injury, under a new measure signed into law Tuesday.

The legislation to widen prosecutors’ discretion to file criminal charges in tenant harassment cases was written by the New York Attorney General’s Office and sponsored by Democratic lawmakers.