The bump stock — a previously obscure gun accessory that became infamous last year when a shooter in Las Vegas used one to speed up his lethal rate of fire at helpless concertgoers — is on its way to being banned in Maryland.

The state Senate gave final approval to the bill Wednesday on a 35-11 vote. The measure now goes to Republican Gov. Larry Hogan, who has said he would sign it.

Maryland is now set to become one of fewer than a half-dozen states to take action against the device at a time when elected officials are under pressure to support gun control legislation in the wake of high-profile shootings, including one at a high school last month in St. Mary’s County.

The General Assembly’s approval came as another high-profile gun measure — a so-called “red flag” law requiring gun owners to surrender their weapons if judges find them to be an “extreme risk” — advanced in the Senate after passing in the House. That bill still requires another vote before going to Hogan.

Hogan’s potential approval of both bills would make 2018 one of the best years for the state’s gun-safety advocates, said Jen Pauliukonis, president of Marylanders to Prevent Gun Violence.

“I haven’t seen this much progress on gun violence bills since 2013,” Pauliukonis said. That was the year Maryland passed a ban on many assault weapons.

The bump stock legislation passed Wednesday is a near-total prohibition on owning, manufacturing, selling or purchasing a class of devices also known as “rapid fire trigger activators.”

“It will be the strongest law of its type in the entire country,” Pauliukonis said.

Mark Pennak, president of the gun rights group Maryland Shall Issue, said the bill is ripe to be challenged in court because bump stocks purchased legally before the ban would now be considered illegal.

“Right now it’s just seizure of private property without any just compensation,” Pennak said.

Gov. Larry Hogan pulled out a stamp and a red marker Wednesday to veto a bill that would overhaul the state process for vetting and approving the construction and renovation of schools.

Comptroller Peter Franchot, a Democrat who has no veto authority, nonetheless joined the Republican governor...

The devices became well known after the Oct. 1, 2017 incident in which 64-year-old Stephen Paddock fired on a crowd attending a country music concert in Las Vegas from a 32nd-floor window at the Mandalay Bay Hotel. Paddock killed 58 people and left more than 800 injured as he fired an estimated 1,100 rounds at the people below.

Paddock was found dead in his room, and police have determined no motive for his attack. It was the deadliest mass shooting by a single person in the nation’s history.

One reason Paddock was able to fire so many shots was that he used bump stocks to essentially turn his semi-automatic weapons into fully automatic machine guns.

Almost immediately, calls went out in Congress and state legislatures to ban the devices.

According to the National Conference of State Legislatures, four other states have adopted legislation banning bump stock possession: Massachusetts, New Jersey, Florida and Washington. The group said bump stocks also would probably be illegal under the automatic weapons bans in New York and California. Congress has not acted, but President Donald J. Trump’s administration has taken steps to ban the devices by regulation on the federal level.

In Maryland, House Speaker Michael E. Busch and Senate President Thomas V. Mike Miller — both Democrats — were on board by November with legislation proposed by Del. David Moon, a Montgomery County Democrat, for a broad ban on bump stocks. Hogan, despite his strong rating by the National Rifle Association, endorsed such legislation in late February.

Republican legislators responded to Hogan’s call in enough numbers to make the bill a bipartisan effort. While only three GOP senators voted “yes” Wednesday, the measure received a majority of the party’s votes when it passed the House 128-7 March 12.

At the same time he announced his support for the bump stock ban, Hogan announced he backed the so-called “red flag” legislation that would allow family members, health professionals or police to ask a judge to order the seizure of firearms from an individual believed to be at risk of committing suicide or attacking others. Such legislation has passed the House and was approved by a Senate committee Wednesday on a 7-4 party line vote.

Pauliukonis said this year’s legislation would build on Maryland’s 2013 law restricting assault weapons.

That measure, pushed by then-Gov. Martin O’Malley, is considered one of the nation’s strongest gun control laws. In addition to banning the sale of many arms classified as assault weapons, the legislation limits the size of gun magazines and requires licensing and fingerprinting to purchase handguns.

Moon’s bill doesn’t stop at bump stocks, which use a semiautomatic gun’s recoil to mimic the speed of an automatic weapon. Pauliukonis said the Maryland law will ban the entire category of rapid-fire trigger devices. She said that because other states have passed less comprehensive laws, manufacturers are already working on ways to work around the prohibitions.

The bill headed to the governor’s desk calls for up to three years in prison and a $5,000 fine for violations. Another provision makes it a separate offense to use a rapid-fire device in a crime of violence.

The legislation allows individuals who already own such devices to keep them until Oct. 1, 2019. After that they would need a permit from the federal Bureau of Alcohol, Tobacco, Firearms and Explosives to possess one.

Pennak said that provision does not adequately protect owners of such devices because it relies on federal legislation that hasn’t been passed. He said that if owners can’t receive such authorization, the law requires them to get rid of their bump stocks. That, he said, would amount to an unconstitutional “taking” by the government.

“The state is obligated to pay for what it takes,” Pennak said. He added that his group would consider a constitutional challenge in the courts.

Also inviting a lawsuit, Pennak said, is the “red flag” legislation.

The House bill creates what would be known as an “extreme risk prevention order.” It would allow health professionals, police or “any other interested person” to petition a judge to issue an order forcing a gun owner to surrender firearms to law enforcement.

If a judge finds evidence that a gun owner is a threat to himself or others, the judge can order him to hand over weapons.

The measure provides that if the local state’s attorneys or police have probable cause to believe the gun owner hasn’t turned over all weapons, they may seek a search warrant to seize them. The bill protects people who seek such orders from prosecution or lawsuits as long as they act in good faith.

Interest in such legislation heightened after the Feb. 14 attack in Parkland, Fla., that left 17 dead at Marjory Stoneman Douglas School. Authorities later revealed that the shooter’s behavior had raised concerns among police before the rampage, but they had no legal basis for seizing his guns.

Pennak said the red-flag bill is overly broad, especially in how it defines people who can seek an order.

“They’re going only after people who are perceived to be dangerous by a petitioner. We don’t know who the petitioner may be. The bill is ripe for abuse,” he said. “It’s just designed to grab guns first and ask questions later.”

Among other things, Pennak expressed concern about shielding people who seek seizure orders from legal action. He said people could target others for seizure simply because they don’t like gun owners.

Sen. Robert A. Zirkin, chairman of the Senate committee handling the bill, said Wednesday that the panel tightened the language to replace “any other interested person” with family members or others with a close relationship with the gun owner. He said gun control advocates and gun rights proponents agreed.

“Everyone was on board with that change,” the Baltimore County Democrat said.

The “red flag” measure is not guaranteed passage. Before it can go to the governor, the Senate and House must agree on a version. The deadline is Monday, when the legislature adjourns.

A spokeswoman for Hogan, Amelia Chasse, said the governor intends to sign the “red flag” bill, too.

“As with any amended bill, he will review the final version once it reaches his desk,” Chasse said. “The governor supports common-sense policies to prevent individuals with mental illnesses or a violent criminal background from harming themselves or others with a firearm, but believes there must be strong due process protections.”