If housing officials declared the rental property to be uninhabitable, that may be grounds to terminate the lease, but without such a determination it will not automatically terminate the lease.

The first issue is why the property flooded. The landlord will be in the best position to collect rent if the flooding was the fault of the tenant. The tenants will have the strongest defense if the flooding was the fault of the landlord. For other causes, not the fault of either the tenant or landlord, the primary issue is whether the amount of time it took to complete repairs was reasonable under the circumstances.

If the tenants did not cause the damage, the tenants should countersue to (at a minimum) get a rent abatement for the period of time that they were unable to inhabit the rental due to the flooding and completion of repairs. They may more broadly try to convince a court that the duration of the period of uninhabitability was such that they should be excused from their compliance with the remainder of the lease, even if repairs were completed before the end of the lease term. An unreasonably long interruption of the tenancy can provide a basis to break an otherwise valid lease.