SACRAMENTO — The California Legislature on Thursday approved a raft of bills that aim to keep the state’s residents safer from gun violence in the wake of high-profile mass shootings by placing sweeping new restrictions on firearms owners.

Ignoring Republicans’ strident objections, the Assembly endorsed legislation previously approved by the Senate that would require background checks to purchase ammunition, ban possession of high-capacity magazines and close a loophole in the state’s existing assault weapons ban by prohibiting long guns with “bullet buttons” that make it easier for shooters to swap magazines.

In the Senate, lawmakers advanced Assembly-endorsed bills derided by Second Amendment advocates that would restrict residents from buying more than one long gun in a 30-day period and expand the group of people who may request a gun violence restraining order to include mental health workers, employers, co-workers and school employees.

Democrats had been rushing to send the bills to Gov. Jerry Brown by the end of the month to convince Lt. Gov. Gavin Newsom to pull a gun control initiative from an especially crowded November ballot that addresses many of the same topics covered by the legislation. But they gave up when Newsom, a candidate for governor in 2018, refused to back down.

Brown, whose record on gun control is decidedly mixed, is expected to act on the package of bills as soon as Friday morning. It’s not known which measures he will sign and which he will veto. Still, the laws passed Thursday make the California Legislature a leader in an arena Congress and many other states won’t touch.

“California is clearly leading the way on gun control measures,” said John Donohue III, a Stanford law professor and gun policy expert.

The package of 12 bills had been introduced following last December’s terrorist killings in San Bernardino — months before the recent massacre at an Orlando gay nightclub that killed 50 people, including the gunman.

“No one measure on its own can plug up all the holes,” Donohue said, “but if you start filling enough of them, it starts having an impact.”

The Firearms Policy Coalition and other pro-gun advocacy groups railed against the votes as an abuse of power and urged Californians to flood Brown’s office with phone calls, urging him to veto all the bills.

“It is now on the people of California to use the First Amendment to stand up for the Second,” said Craig DeLuz, the coalition’s director of public and legislative affairs. “It is critical for law-abiding citizens to contact the governor and urge him to use pragmatism and common sense to thwart this assault on their and their neighbor’s civil rights.”

Assemblywoman Shannon Grove, R-Bakersfield, accused Democrats of blaming “those horrors and those terrorist attacks” that took place in Orlando, San Bernardino and Newtown on law-abiding gun owners.

“You want to blame something you can control, but you can’t control murder,” she said. “You can’t control insanity.”

But Senate President Pro Tem Kevin de León defended the legislation, saying it will “surely save lives.”

Reading this on your phone or tablet? Stay up to date on Bay Area and Silicon Valley news with our new, free mobile app. Get it from the Apple app store or the Google Play store.

“We are sending the governor the strongest and most comprehensive set of gun violence prevention measures in a generation,” he said.

Of all the proposals the Assembly considered, de León’s bill to require background checks for ammunition sales sparked the greatest debate because it seeks to override a provision of Newsom’s ballot measure before voters have weighed in on it.

Successful legislation authored by de León in 2009 regulated the sale of ammunition, but a judge later ruled that its definition of ammunition was too vague to enforce.

De León’s Senate Bill 1235 seeks to remedy the problem by defining ammunition as “one or more loaded cartridges consisting of a primer case, propellant and with one or more projectiles.”

Newsom’s Safety for All initiative would also regulate the sale of ammunition and require background checks for prospective bullet buyers, but the bill and the ballot measure differ in their approach. And in a brazen move, de León recently amended SB 1235 to state that his bill’s ammunition background check scheme must take precedence over a provision in Newsom’s initiative even if it passes in November.

“This bill is a classic razzle dazzle rigmarole bait-and-switch,” said Assemblyman Brian Jones, R-Santee, who joined a chorus of GOP Assembly members who questioned whether de León’s actions were even legal. The nonpartisan Office of Legislative Counsel, however, says they are.

Earlier this week, Dan Newman, a spokesman for Newsom, issued a statement criticizing de León’s move as “shockingly, sickeningly cynical.” But on Thursday Newsom dialed-back the rhetoric, saying he was “pleased” with the votes.

“With the governor’s signature, those new laws would represent a meaningful step in the right direction,” Newsom said in a statement. “Now, with the Safety for All initiative, voters will finally have a chance to take matters into their own hands and keep the momentum going with bold reforms that build and expand well beyond today’s achievements.”

Brown will be the one who ultimately decides how many pieces of Newsom’s initiative become redundant based on the bills he chooses to sign and veto. The ballot measure would regulate all ammunition sales similarly to firearms sales; require licensed vendors to report ammunition theft within 48 hours; outlaw possession of large-capacity magazines; make theft of a firearm a felony; and create new court processes to ensure that firearms are surrendered by people upon conviction of serious crimes.

That new court process and the requirement to report lost or stolen ammunition are the only components of the initiative the bills sitting on Brown’s desk don’t address in some capacity.

Thursday was also the deadline for initiatives to qualify to appear on the November ballot. Voters will decide a dozen and a half measures on topics ranging from prescription drug prices to the death penalty to marijuana legalization.

Legislation requiring background checks for the purchase of gun parts that could be used to assemble a firearm also cleared the upper house easily, as did a bill that would strip a resident’s gun rights for 10 years as punishment for knowingly filing a false report of a gun loss or theft.

The only bill that struggled to win enough support to advance was Assemblyman Phil Ting’s AB 2607 to expand the group of people who may request gun violence restraining orders.

While the current law only applies to family members and law enforcement officers, the new legislation would extend that right to mental health workers, employers, co-workers and school employees.

Initially, only 18 senators voted in favor of the bill, but three Democrats later added their support, giving the legislation the 21 votes it needed to advance.

Sen. Anthony Cannella, R-Ceres, argued that the proposal would be ripe for abuse.

Have “you ever had co-workers that you haven’t gotten along with?” he asked, insisting that people who have been hostile to one another in the workplace would unfairly twist the legislation to their advantage.