PORTLAND, Ore. — When Oregon’s political leaders debated solutions to a housing crisis that was forcing renters from their homes and sending prices through the roof, they had a central goal in mind: Avoid the fate of neighboring California.

“In Portland, we’re just trying not to become San Francisco,” where housing prices are among the highest in the nation, said Tina Kotek, the speaker of Oregon’s House of Representatives.

This year, Kotek and her colleagues advanced the most ambitious response in the country to housing affordability challenges. Lawmakers passed a first-in-the-nation cap on rent increases and, in an effort to spur home building, became the only state to eliminate single-family-only zoning in many residential neighborhoods.

California lawmakers, in contrast, have struggled to pass strong renter protections and legislation that would significantly increase the housing supply.

Oregon voters had pushed legislators to act on housing, as did a larger and more diverse coalition of activists united behind the cause. And Gov. Kate Brown and legislative leaders came together to support a housing plan.

“Our crisis is so severe in this state, you have to do everything,” Kotek said. “It’s that problematic out there for folks. We just came in and said, ’We’re going to do it all.’ ”

Home to four million people, Oregon is one-tenth the size of California. The state’s median home value, according to the real estate website Zillow, is $345,800, compared with California’s $547,500. But parts of Oregon have seen a flood of job growth on par with that in California’s priciest metropolitan areas. And even though developers in Portland are building homes at a much faster rate than Los Angeles, San Francisco, or San Diego, housing cost pressures have taken their toll.

Outside a small apartment complex in southwest Portland, Pamela Phan, the organizing director of Community Alliance of Tenants, pointed at ripped screens and cardboard on windows and doors and said residents there had told her about infestations of rats, mice, and cockroaches.

Tenants “complain and complain, but nothing gets done,” Phan said. “And the rents keep going up and up.”

Residents, many of whom are Somali, Latino, or other immigrants from low-income families, prize the location for its proximity to a mosque and elementary school, she said. Some have seen rent hikes as high as 25% in recent years, and a two-bedroom apartment that used to cost $750 a month about a decade ago now runs $1,300.

But Phan said capping rents alone won’t solve the state’s housing problems. Single-family neighborhoods must open up to growth, she said, citing a history of racist deed covenants and mortgage lending practices.

“We know that single-family zoning is exclusive,” Phan said. “Folks who have gained generational wealth from single-family homes in this country are by and large white people. That was by design.”

Kotek’s legislation allows fourplexes in single-family home neighborhoods in the Portland metro area and other larger cities. Smaller cities will have to allow duplexes, and rural communities face no changes.

Gov. Brown, a Democrat, had urged lawmakers to act in her State of the State speech in January.

“The extent of Oregon’s housing crisis was really felt across the political spectrum,” said Brown, who plans to sign the bill curtailing single-family zoning. “From left to right. Everyone was ready to take action.”

Oregon has a deep legacy of state involvement in housing issues through legislation passed in the 1970s that restricts growth to urban areas. That history, Brown said, also eased the path for the state to mandate changes to local zoning rules.

Not everyone is on board. Rod Merrick, 70, has lived in his home at the end of a cul-de-sac in Portland’s Eastmoreland neighborhood for nearly four decades. The community has a public golf course, a tree-lined boulevard that leads up to the private liberal arts school Reed College, and a botanical garden. Merrick, who is an architect, has been frustrated that developers are buying older homes in the community and replacing them with larger, new single-family homes and duplexes.

He worries that the new legislation will accelerate that process by leading to the development of fourplexes that he believes will be less affordable than existing homes and out of scale with the community.

The legislation is “envisioned by urbanists and planners as salvation, and it’s a really bad idea,” he said.

Instead of pushing development into single-family neighborhoods, he said, lawmakers should add incentives to build in the city’s commercial and transportation corridors.

But to Kotek, those objections don’t acknowledge the depth of the state’s housing problems.

“You know the argument, ’I’m really supportive of this, but can’t we just have people live next to transit? Can’t we just put them in certain places?’ ” she said. “And I was like, ’No.’ The goal is to have diversification throughout the neighborhoods so you’re not having concentration based on income or based on any other factor.”