A federal appeals court on Thursday upheld a key provision of Maryland’s gun-control laws, maintaining the state’s tough restrictions on carrying handguns in public places.

Gov. Martin O’Malley, Attorney General Douglas F. Gansler and grass-roots groups supporting stricter gun control hailed the decision, saying that it places Maryland on firm legal ground as the Legislature looks to tighten gun laws further. The state is looking to ban assault weapons and require gun buyers to submit to fingerprinting.

In a unanimous decision, a three-member panel of the U.S. Court of Appeals for the 4th Circuit overturned a lower court ruling that found the state’s permitting system at odds with the Second Amendment guarantee of the right to bear arms.

At issue in the case — one of many challenging gun restrictions around the country — was Maryland’s requirement that residents provide a “good and substantial reason” to the state police for carrying a handgun.

In a 33-page opinion, Judge Robert B. King wrote that the state has “clearly demonstrated” that such a requirement “advances the objectives of protecting public safety and preventing crime because it reduces the number of handguns carried in public.”

Attorney Alan Gura, who argued the case on behalf of the Second Amendment Foundation and Navy veteran Raymond Woollard, said he would continue the challenge.

“The Second Amendment has been held by the Supreme Court to be a fundamental right. It means we don’t have to prove to the police that we have a good and substantial reason to exercise our rights,” said Gura, who has not yet decided whether to seek en banc review by all of the judges on the 4th Circuit or to petition the Supreme Court.

Four years ago, the Supreme Court used a case from the District to declare for the first time that the Second Amendment guarantees a person’s right to own a firearm. But the appeals court on Thursday did not seek to answer the broader question judges have been wrestling with — whether the individual right to keep a firearm in one’s home for self-defense extends outside the home. Gura also argued the District case.

The appeals court found that U.S. District Judge Benson Everett Legg used an unrealistic standard in judging Maryland’s permitting system: The lower court was wrong to overturn the law because it did not “single-handedly safeguard the public from every handgun-related hazard,” the court said

Instead, the appeals court found that the burden on citizens of proving a “good and substantial reason” is constitutional. The court agreed with the attorney general that the current system fits the state’s “significant interests in protecting public safety and preventing crime.”

Had the court upheld the lower court ruling, state police estimated a surge of 15,000 new permit applicants within a year. Legislative analysts predicted a much smaller increase of about 3,600.

Gansler, whose office defended the law, said the court’s ruling was “critical for public safety.”

“If this had been reversed, any person who wished could have walked in, gotten a gun and [toted] it around in public places with no particular reasons for doing so,” he said.

For decades, Maryland has allowed law enforcement officials to decide whether a person should be allowed to carry a handgun. The court noted that the state readily provides permits to people in certain professions, such as security guards, prosecutors and armored-car drivers. Permits may also be issued for “personal protection” if threats can be verified — a threshold gun-rights advocates consider tough to prove.

Maryland’s approach is similar to permitting systems in California, New Jersey and New York. The appeals court on Thursday cited its agreement with a recent decision by the 2nd Circuit, upholding New York’s licensing system that requires a person to demonstrate “proper cause” before a permit is issued.

Woollard initially received a carry permit after his son-in-law broke into his Baltimore County house in 2002. But his renewal request was denied in 2009, after a state board ruled that he had not demonstrated a “good and substantial reason” for continuing to carry a handgun.

The case had loomed over the governor’s sweeping gun-control package since O’Malley (D) introduced it in January. Republican opponents of the governor’s plan to fingerprint and license gun buyers repeatedly cited the case in debate on the Senate floor. They said an opinion by Gansler calling the fingerprint proposal constitutional was more or less worthless until the courts decided whether he had erred in defending the carry law.

State lawmakers had also grown increasingly anxious about the timing of the decision. Heading into the final weeks of Maryland’s General Assembly session, the governor’s bill remains bogged down in the House of Delegates because of a disagreement over which guns should be included in an assault weapons ban.

If the lower court ruling had been upheld, it would have opened a new front in negotiations, advocates warned.

After the decision circulated online through the Maryland State House on Thursday, Vincent DeMarco, president of Marylanders to Prevent Gun Violence, approached reporters and lawmakers with, “Did you hear? This is huge.”