Landlords cannot evict a tenant in retaliation for exercising their legal rights, such as reporting code violations to the authorities. The law also prohibits landlords from evicting tenants based on race, gender, or religion. Property owners may also face problems evicting squatters with adverse possession rights under the law.