DALY CITY — In what appears to be the first lawsuit testing tenant protections that have sprung up across the state in recent weeks, two dozen Daly City families will get to spend the holidays at home after winning a battle against the landlords who tried to force them out.

The tenants’ victory is the culmination of a months-long fight centered around controversial state-wide renter protections that take effect Jan. 1, as well as an emergency ordinance passed recently by Daly City officials. The lawyers involved say more lawsuits could follow as landlords and renters navigate the new state law and other similar emergency tenant-protection measures that have gone into effect in cities around California.

The lawyers who filed the lawsuit hope their clients’ win will inspire other renters to fight for their rights, while also prompting landlords to follow the law. If not, Assembly Bill 1482 — which caps rent increases and prevents landlords from evicting tenants without cause — may not be as effective as supporters hope. The law lacks an enforcement mechanism, meaning the only way renters can force landlords to comply is by taking them to court.

“The thing about it is, it doesn’t really mean anything unless you enforce it,” said Madeline Howard of the Western Center on Law and Poverty, one of the lawyers who filed the Daly City suit. “So I think it’s tremendously important to show that this is a thing that can be enforced.”

AB 1482, which passed in September, limits rent increases throughout the state to about 9% a year and prevents landlords from removing tenants without an approved reason — such as a failure to pay rent. But as soon as the law was passed, tenant-rights advocates reported a spike in landlords trying to remove tenants before the new law went into effect.

In response, cities began passing emergency ordinances that essentially implemented AB 1482’s protections early. So far, at least 40 jurisdictions around California have done that, according to Daniel Saver of Community Legal Services in East Palo Alto. The Daly City case appears to be the first to bring one of these emergency ordinances to court.

The case began when at least 25 families living in different Daly City buildings with the same landlords received notices to vacate their homes before Thanksgiving. The families, who call themselves “Familias Unidas en Daly City” or “Families United in Daly City,” fought back with protests. In response, Daly City officials passed an emergency ordinance Oct. 28 that kickstarted AB 1482’s protections two months early.

But despite the ordinance, the landlords, identified in court documents as the Guadalupe & Estela Campos Revocable Trust, did not revoke the notices to vacate, according to the tenants’ lawyers. Last month, the attorneys sued the Campos family and threatened to seek a court order forcing them to let the renters stay. Less than a week later, the Campos family tentatively agreed to stop the eviction process, according to the lawyers. The parties spent the next several weeks negotiating and have now come to terms that will allow the renters to stay in their homes.

A call seeking comment from the Campos family was not immediately returned.

The resolution is great news for 63-year-old Minerva Sarte, who has lived in a Campos-owned apartment for almost 14 years and is thrilled she and her husband will get to celebrate Christmas in their home. Sarte and her husband pay $1,650 a month for their studio apartment in Daly City.

“We’re so very happy that we’re staying here,” she said.

Landlords who see the Daly City win might think twice about running afoul of AB 1482 and state emergency ordinances, said Shirley Gibson of the Legal Aid Society of San Mateo County, one of the lawyers who filed the lawsuit. But if not, Gibson and her team will be ready for more litigation.

“We’ll do it again,” she said, “if we have to.”