Vice Chair of the Judiciary Committee Kathleen Dumias (D) talks about amendments as the Maryland House of Delegates prepares to vote on Senate Bill 281 on Wednesday in Annapolis. (Jonathan Newton/The Washington Post)

The Maryland House of Delegates passed what would be among the nation’s most restrictive gun-control measures Wednesday, voting to ratchet up the state’s already tough rules by requiring fingerprinting of gun buyers, new limits on firearm purchases by the mentally ill, and bans on assault weapons and on magazines that hold more than 10 bullets.

The 78 to 61 vote handed Gov. Martin O’Malley (D) a major policy victory as Maryland joins the ranks of Democratic-leaning states passing broad gun-control restrictions in response to the December school shootings in Connecticut — a state where lawmakers Wednesday also passed tough new gun legislation.

The bill now returns to the state Senate, which passed a substantially similar version of the legislation last month. Key senators and staffers said they expect the chamber to sign off on changes made by the House and send the measure to O’Malley, who proposed the legislation.

Amid the wave of legislative efforts nationally, Maryland’s is the only package whose new requirements would force gun buyers to provide fingerprints and undergo classroom training, target practice and background checks to obtain a license to buy a firearm.

No state had sought to impose a licensing requirement in nearly 20 years, a period when the National Rifle Association grew increasingly powerful in American politics. The NRA criticized the Maryland House vote, continuing months of complaints that licensing and fingerprinting amount to a fundamental infringement of a constitutional right.

The vote on one of O’Malley’s top priorities of the legislative session, which ends Monday, came as federal gun-control legislation is stalled in Congress: An assault-weapons ban is no longer part of a bill, and universal background checks have bogged down.

Maryland would join five states — Connecticut, Hawaii, Massachusetts, New York and New Jersey — in requiring fingerprinting of gun buyers. It also would join seven states and the District in banning a wide array of assault weapons.

Under the Maryland bill, any resident wanting to buy a gun would have to pass the new training and testing requirements before receiving an ID card issued by the Maryland State Police. State officials said the ID card would be similar to a driver’s license, probably with a photo. It would have to be renewed every 10 years.

Marylanders would not need to get a license to buy hunting rifles and shotguns.

With scores of gun rights advocates and gun-control activists in the balconies of the marbled House chamber, Republicans and conservative Democrats on Tuesday made a last stand on the House floor. They forced dozens of votes on amendments designed to weaken or halt the bill, including a move to strip out the licensing requirement.

Among other arguments, opponents of the bill said the state lacks enough firing ranges, firearms instructors and state police to process the licenses in a timely manner.

A surge in firearm sales in Maryland since December has turned the state’s mandatory seven-day waiting period to buy a gun into a 55-day wait, state police said during the debate.

During a speech in Denver to amp support for gun-control legislation, President Obama renewed pressure on Congress to enact stricter background checks. (Nicki Demarco/The Washington Post)

Del. Michael A. McDermott (R-Worcester) said the licensing requirement would add even more delay, amounting to a “defacto ban” on gun sales in Maryland.

As he left the State House, House Minority Leader Anthony J. O’Donnell (R-Calvert), called the measure a “Mickey Mouse” gun ban designed only to help O’Malley “punch his ticket” for a run at higher office.

“It was passed to further the national political ambitions of this governor, and I think it will be challenged in court,” O’Donnell said.

Shannon Alford, who led the NRA’s efforts against the bill, said the vote that would matter more would come next year, when every seat in the legislature is up for reelection. “They’re going to have to listen to us in 2014,” she said. “That’s the only poll that counts.”

But O’Malley hailed the vote as a historic victory that would make the Maryland safer.

“Our state shouldn’t settle for being in the top 10 most violent states in America, there are a lot of lives that can be saved,” he said in a brief interview. “The tragedy in Newtown [Conn.] gave us the inflection point, the ability to forge a consensus that prior to that awful tragedy might not have been possible. Hopefully, we can wrest some good out of that.”

Del. Kathleen M. Dumais (D-Montgomery), who led Democrats’ 11-hour defense of the bill, called the fingerprinting and licensing requirement one of the most important parts of the legislation.

“This is not just about responding to tragedies” Dumais said. “This bill is to address, specifically, what Maryland needs, and the problem Maryland has is with handguns.”

Police and prosecutors lauded the licensing provision, which they predicted would be even more important in curbing crime than the assault-weapons ban.

Although assault-type weapons were used in recent mass shootings such as occurred in Newtown and Aurora, Colo., they have been used in less than 1 percent of Maryland homicides since 2004, when a federal assault-weapons ban lapsed.

The licensing requirements would help reduce everyday gun crime by slowing the flow of firearms through “straw purchases,” advocates said. In a straw purchase, someone buys a gun for a person not allowed to make the purchase. Prosecutors say the practice is widespread in Prince George’s County and in Baltimore.

“What Governor O’Malley is doing here is going to change the national dialogue,” said Vincent DeMarco, a longtime gun-control advocate. “Every state will be looking at what Maryland did and asking if that can be done here.”

Under the bill, Maryland would impose blanket restrictions on people involuntarily committed for mental health treatment. The change is similar to one Virginia made after the 2007 mass shooting at Virginia Tech.

Residents committed against their will for any length of time would be banned permanently from buying weapons. They would need to petition the state to have their gun rights reinstated. Currently, a patient must be institutionalized for at least 30 consecutive days to lose gun rights — a threshold not met by more than 50,000 Marylanders who have been committed to state facilities but who are allowed to own firearms.

The House pulled back from imposing such prohibitions on patients who voluntary seek admission for psychiatric treatment. The Senate voted to ban some patients who are institutionalized after visiting emergency rooms for mental health reasons.

The final House vote also followed a protest by Republicans after Democrats engaged in last-minute maneuvers to strip out changes that had been agreed to last week by majorities of two House committees — changes opposed by O’Malley’s office.

One would have exempted hundreds of volunteers in the Maryland Defense Force from many provisions of the bill. The head of the state’s National Guard objected to that measure this week, saying most volunteers functioned as support staff with no firearm training or need for special status. Another aborted change would have reduced the minimum age for handgun ownership, now 21, for military veterans and service members.

The vote on the bill broke down most starkly along geographical lines, with every lawmaker present from Montgomery, Prince George’s and Baltimore voting for it; almost every delegate from the western, eastern and southern parts of Maryland opposed it.