SAN FRANCISCO — San Francisco landlords will pay more than $1 million to people left homeless after fire swept through their illegal warehouse apartments.

The San Francisco Chronicle reports that Albert Joseph and David Kimmel agreed to settle a lawsuit filed by eight tenants they evicted after fire damaged the Mission District warehouse in 2014.

The warehouse wasn’t zoned for residential use and the landlords said they were going to convert it back to commercial use.

Those evicted had to find new homes in one of the nation’s most expensive rental markets.

They sued for negligence and wrongful eviction, claiming the warehouse was rat-infested and had safety violations.

Their lawyer says the settlement could have implications for others evicted in a crackdown on illegal living spaces following last year’s deadly Oakland warehouse fire.