SAN JOSE — City elected leaders Tuesday approved sweeping new measures to strengthen renter protections in one of the nation’s most expensive markets — including a requirement that landlords cite a reason for refusing to renew a lease — a move advocates called “historic.”

“I feel outstanding gratitude to the six members of the City Council who had the courage and compassion to make this happen,” said longtime advocate Bob Brownstein, who said he’s pushed for these policies for 40 years.

But the changes didn’t come without a long and dramatic fight. The City Council approved the new renter policies on a split 6-5 vote after four hours of emotional testimony from frustrated and fearful renters.

The biggest change requires landlords to provide a reason for eviction under a “just cause” ordinance. Some of the reasons include not paying rent, damaging the apartment or creating a nuisance. San Jose was the the only major Bay Area city without such a policy.

“I feel a moral obligation to represent my residents — not those who live outside San Jose,” said Vice Mayor Magdalena Carrasco, who was the swing vote in favor of the policy. The five dissenters were Mayor Sam Liccardo and council members Chappie Jones, Lan Diep, Dev Davis and Johnny Khamis.

Advocates said such a law is needed to protect renters from being turned out by landlords just so they can rent to someone willing to pay more. San Jose has had more than 2,400 evictions without cause since 2010, city leaders said.

“This has to stop,” said Jason Reyes, an organizer with Silicon Valley De-Bug. “This is all about greed. We need you to pass this to protect us from all these corporate landlords who live far away and have no interest in our community.”

But landlords said the law creates unnecessary burdens and limits their ability to get rid of bad tenants.

“More laws divide people,” said Bill Wu, a San Jose duplex owner. “Rent control has been going on for years, but never solved the problem. We need more housing — not more laws.”

City housing leaders proposed a policy protecting renters from being kicked out after they complain about repairs or building conditions. But four council members, spurred by recent cases of vulnerable renters facing loss of their longtime apartments, including 92-year-old World War II veteran Paul Mayer, wanted San Jose to go further.

Council members Raul Peralez and Donald Rocha said all renters after six months of tenancy — not just those who complain about conditions in their apartments — should be given a reason before losing their apartment. Council members Sylvia Arenas and Sergio Jimenez said those protections should kick in right away, not after six months of tenancy.

The policy approved Tuesday will apply to all renters from day one. It is estimated to impact 450,000 renters citywide.

“The landlords have all the power and tenants have none,” said Jimenez, who grew up in low-income housing in East San Jose and fought hard for the policies Tuesday. “We didn’t have much, but we did have stability. We had the same apartment for many years — and if we didn’t have that, I’m not sure I’d be here with you today.”

Diep and Davis supported the staff plan to only protect those who file complaints, and called for eliminating a proposed policy requiring landlords of rent-controlled units to offer written, 12-month leases — neither of their proposals prevailed.

Khamis, a rental property owner himself, rejected all the proposals, and instead suggested city leaders look into hiring a law firm to help renters and send postcards informing them of their rights under existing state and local housing laws.

Jones tried to offer a compromise — protecting renters against eviction after 12 months of tenancy — but didn’t garner enough support. In one of the meeting’s most heated moments, Councilman Tam Nguyen suggested putting those rules in place after nine months.

It sparked outrage from the audience — one person yelled “you lied to the community, Tam” — because Nguyen had previously voiced support of a full just-cause policy for all renters.

As part of Tuesday’s action, city housing officials also will study tying rent increases in the city’s 43,000 rent-controlled units to inflation — instead of the current 5 percent increase allowed annually — an idea backed by Rocha and Peralez. Rocha also succeeded in asking staff to look at putting duplexes under rent control, which would add another 11,000 units.

The City Council also approved Ellis Act protections on a 6-5 vote Tuesday. The same five council members dissented.

That policy requires landlords of rent-controlled units to provide 120 days to a year of notice before they demolish, remodel or convert their buildings and give renters the right to return. They also must provide displaced renters money to relocate. If those units are re-rented within five years, the landlord would need to put all new units back under rent control.

Ruby Dominguez, a retired caretaker who was evicted without cause from her apartment after 27 years, said Tuesday she’s grateful it won’t happen to other renters.

“It could happen to anybody,” said Dominguez, 73. “Nobody thinks about it until it happens to them.”