Legislative efforts to give San Francisco the ability to curtail the number of Ellis Act evictions in the city failed Wednesday night as the state Senate rejected a bill by Sen. Mark Leno after an 18-19 vote.

The San Francisco Democrat may try once more to garner additional support before Friday’s deadline to move bills out of their house of origin.

SB1439 would have required a San Francisco landlord to own a building for at least five years before they could evict tenants using the Ellis Act. The 1986 state law allows property owners to evict tenants in order to get out of the rental business, but it has been used by speculators as a way to buy affordable properties, evict tenants and flip the rental for profit.

“We’re talking about hard-working people trying to make their way in a very expensive city,” Leno said. “And for no cause, for no reason, they are being evicted.”

The bill would only have applied to San Francisco, where evictions led to protests over the city’s growing economic inequality as high-paying tech workers moved in and higher rents forced families, artists and low-wage workers out of the city.

SF.citi, a tech alliance led by venture investor Ron Conway, urged tech companies to combat the backlash by helping stop Ellis Act evictions through Leno’s bill. More than 75 companies signed on, including Twitter, Yelp and Salesforce.

San Francisco has the highest rent in the nation and its median home price for a two-bedroom is almost $1 million. 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.

Opponents said Leno’s proposal was overreaching and punished landlords. The California Apartment Association, which opposed the bill, said Ellis Act evictions are not the epidemic that Leno has characterized. Others faulted San Francisco for not taking necessary steps to build more affordable housing.

“Over and over and time and time again I heard from cities and counties asking to be exempt from having to build affordable housing,” said Sen. Norma Torres, D-Pomona. “San Francisco has not done their fair share and now they are coming to us and saying because we have not provided affordable housing, we want you to pass along the cost to the small landlords.”

Leno said Torres is misinformed and San Francisco has built the most affordable housing in the state.

San Francisco Mayor Ed Lee, who requested the bill, said last month that adding more housing must be part of the plan and reiterated his recent call for 30,000 homes to be built or rehabilitated over the next six years. But, he said protecting existing units must also be a part of the city’s strategy.

Assemblyman Tom Ammiano, D-San Francisco, also authored a bill to thwart Ellis Act evictions, but it failed in the Assembly last month. AB2405 would have allowed local governments to place a moratorium on Ellis Act evictions when the housing supply dips to critically low levels.