After a tense and sharply divided debate Tuesday, the Los Angeles City Council voted to oppose a state bill that aims to vastly expand high-density housing near public transit hubs, arguing that the state should leave important planning decisions to local legislators.

The council voted 8 to 5 to oppose Senate Bill 79, which seeks to mitigate the state’s housing shortage by allowing buildings of up to nine stories near certain train stops and slightly smaller buildings near some bus stops throughout California.

“A one-size-fits-all mandate from Sacramento is not safe, and it’s not responsible,” said City Councilmember Traci Park at a news conference before the vote.

Park, who was joined at the news conference by Councilmembers Monica Rodriguez and John Lee, said the bill was an attempt by its sponsor, state Sen. Scott Wiener (D-San Francisco), and other state legislators to “hijack” local planning from the city.

Lee, who authored the resolution opposing the bill, called it “not planning” but “chaos.”

Wiener lamented the City Council’s vote.

“Opponents of SB 79 are offering no real solutions to address our housing shortage at the scale needed to make housing more affordable,” Wiener said in a statement. “California’s affordability crisis threatens our economy, our diversity, and our fundamental strength as a state.”

In addition to creating more affordable housing, the bill would increase public transit ridership, reduce traffic and help the state meet its climate goals, he said.

Councilmember Nithya Raman, who voted against opposing the bill, said the city’s housing crisis is so dire that the council needs to work with the drafters of the bill — even if there are elements of it they do not support.

“Overall, we talk a lot about our housing crisis on this body, but our actions have not met the moment,” she said. “If I thought that this body was acting in good faith to address our housing crisis, I would support this [resolution].”

The bill, which passed the Senate and is before the Assembly Appropriations Committee, would allow heights of nine stories near major transit hubs, such as certain Metro train stops in L.A. A quarter-mile from a stop, buildings could be seven stories tall, and a half-mile from a stop, they could be six stories. Single-family neighborhoods within a half-mile of transit stops would be included in the new zoning rules.

Near smaller transit stops, such as light rail or bus rapid transit, the allowed heights would be slightly lower.

Next week, the Appropriations Committee will determine whether the bill goes to the Assembly floor for a vote. If passed in both chambers, the bill would go to Gov. Gavin Newsom to sign by mid-October.

The City Council’s resolution opposing the bill has no binding effect on the state Legislature but gives the council a platform to potentially lobby in Sacramento against its passage. The resolution also called for the city to be exempt from the bill because it has a state-approved housing plan.

“If they hadn’t taken a position on this, the state Legislature would say, ‘Well, the city of L.A. doesn’t care,’” said Zev Yaroslavsky, a former City Council member and now the director of the Los Angeles Initiative at the UCLA Luskin School of Public Affairs.

Mayor Karen Bass has not yet taken a position on the bill. City Attorney Hydee Feldstein Soto came out against it in May, arguing that it would cost the city billions of dollars to upgrade infrastructure such as sewage and electrical systems to handle an influx of residents in previously low-density neighborhoods.

Wiener’s office said the bill allows for cities to exempt some properties near transit hubs if they meet density guidelines.

This year, the City Council passed the Citywide Housing Incentive Program, which provides incentives for developers to build market-rate and affordable units and aims to boost building along commercial corridors and in dense residential neighborhoods.

The council passed the ordinance, which left single-family zones largely untouched after pushback from homeowners groups, a week before a state deadline for the city to have a housing plan in place. As part of the plan, the city was required to find land where an additional 255,000 homes could be built.