A woman sat in front of a large chart showing the numbers of evictions because of the Ellis Act since 1997 Wednesday September 25, 2013 in San Francisco, Calif. The Lee family has lived on Jackson Street in San Francisco for decades and now is being evicted under the Ellis Act. Friends, politicians and religious leaders gathered at their home to show their support for the elderly couple and stand against evictions of longtime residents.

Sacramento -- - Last-minute negotiating and a couple of promises revived legislative efforts at the Capitol to give San Francisco the ability to curtail the number of Ellis Act evictions in the city.

The Senate on Thursday passed SB1439 by Sen. Mark Leno, D-San Francisco. It requires a landlord in the city to own a building for at least five years before tenants could be evicted under the Ellis Act.

The bill now heads to the Assembly.

The Senate's approval was a big win for Leno, who has worked with Mayor Ed Lee on a housing bill that would only apply to San Francisco, where evictions driven by an influx of tech workers have led to protests by longtime residents over the city's growing economic inequality.

San Francisco has the highest rent in the nation, and the city's rent-control housing supply has decreased by more than 1,000 units in the past two fiscal years, according to a report from the city controller. Other reports place the loss even higher.

The 1986 Ellis Act allows property owners to evict tenants in order to get out of the rental business, but the law has recently been used by speculators in the city as a way to buy affordable properties, evict tenants, and renovate and flip a property for profit, Leno said.

"The concern here is that a state law created by this Legislature is being abused," Leno said.

The state Senate had rejected Leno's bill in a 19-18 vote Wednesday night, but Leno promised to make several key amendments Thursday to garner the 21 votes needed to keep the bill afloat before a Friday deadline.

The yet-to-be-written amendments would exempt one or two small properties owned by "mom-and-pop" landlords from new Ellis Act restrictions and may also include a sunset date for the bill.

Leno told lawmakers that if they passed his bill on to the Assembly while he worked on the amendments, he understood they may not support the legislation when it returns for a Senate vote to approve the changes. He said the bill would be just as effective with the amendments.

"Although there has been concern about protecting 'mom-and-pops,' the data I've seen shows they aren't the ones doing the Ellis Act evictions," Leno said.

Three lawmakers changed their votes to support Leno's bill: Sen. Jerry Hill, D-San Mateo; Sen. Ben Hueso, D-San Diego; and Sen. Ed Hernandez, D-West Covina (Los Angeles County). Hill said he had concerns about how his constituents who own property in San Francisco would be affected.

Hueso said he wanted to help Leno solve a problem in his district, but that he was "philosophically opposed" to the method he was using to address the issue.

Sen. Norma Torres, D-Pomona (Los Angeles County), said she continues to take issue with Leno's approach.

"This is a San Francisco problem created by San Francisco because of 'nimbyism' and the lack of will to build affordable housing," Torres said.

Leno said he's willing to work with senators who have concerns, but said he takes exception to the idea that San Francisco isn't building enough housing.

"There are 37 cranes in the air in San Francisco right now," Leno said. "The joke is the official bird of San Francisco is the crane."