Tenants in units covered by the San Francisco Rent Ordinance have the right to stay in their units after a foreclosure on the same terms and conditions as before the foreclosure. The covered units continue to be covered by the Rent Ordinance following a foreclosure, and foreclosure is not a just cause for eviction.
In response to the rise in foreclosures, legislators amended the Rent Ordinance in 2010 so that it now extends protections even to many tenants in units that were not previously covered by the Rent Ordinance. For instance, units built after June 13, 1978 are typically not covered by the Rent Ordinance, and an owner may evict tenants in those units without just cause. But effective April 25, 2010, tenants in those units at the time of a foreclosure may not be evicted by the owner who took title through the foreclosure sale unless the owner has just cause under the Rent Ordinance.
It is important to note that these new protections only apply so long as the property is owned by the owner who purchased the property through the foreclosure. Once that owner sells the property to someone else, the extended tenancy protections likely do not apply.
New owners should also be aware that the Rent Ordinance now requires owners to give tenants notice of certain rights under the Rent Ordinance within 15 days after a foreclosure.
The full text of the above amendments can be found in San Francisco Administrative Code Section 37.9D.