The one-year ordinance, spearheaded by Council President Eric Garcetti, will impact 300,000 apartment buildings and single-family homes.
"This will work to help residents stay in their homes and keep the communities in tact," Villaraigosa said at a City Hall news conference.
During the first nine months of the year, 1,300 rental buildings in the city of Los Angeles went into foreclosure, affecting tenants in 3,700 units.
Earlier this week, Fannie Mae, the government-sponsored lending corporation, announced it would renew leases for renters living in foreclosed properties now in the possession of the company.
"Renters are truly innocent victims in the foreclosure crisis," Garcetti said. "We are seeing innocent renters, who are playing by the rules, who are paying their rent, being kicked out of their apartments."
Renters who are being evicted as a result of foreclosure were urged to contact the city's Housing Department at 866-557-RENT.