Updated

Maryland residents have been buying guns in record numbers before a law takes effect Tuesday, with provisions aimed at helping keep guns away from criminals and the mentally ill, strengthening safety training and banning 45 types of assault weapons.

Opponents decry what they call an ineffective law that will only make it harder for law-abiding citizens to exercise Second Amendment rights. They say the state also failed to prepare properly for implementation after Gov. Martin O'Malley, who is considering a run for the White House in 2016, pushed the complicated measure through the General Assembly to build his credentials for a potential Democratic primary race

On Thursday, opponents of the restrictions sued in federal court in Baltimore, seeking to block the legislation from taking effect. The court scheduled a hearing for Tuesday on their motion for an order that would temporarily block implementation while the court considers whether to permanently bar Maryland from enforcing the law.

When O'Malley signed the legislation in May, he highlighted a provision that will require residents who buy a handgun to be fingerprinted to own a handgun, making Maryland the sixth such state to do so.

"States with similar licensing provisions have substantially lower gun death rates than states that do not. So, if we want better results, we have to make better choices, and this legislation is part of that series of better choices that we are making," the governor said. The other states are Connecticut, Hawaii, Massachusetts, New Jersey and New York.

But state Sen. Nancy Jacobs, a Republican who opposed the measure, questioned the effectiveness of the law, including the fingerprinting provision. She said she submitted the required digital fingerprints when she made a recent gun purchase and was told they could not be recognized correctly. The senator from Harford County also said criminals will find other ways to get guns, as they always have.

"They are going to continue to buy them on the street," Jacobs said. "They are going to continue to break into peoples' homes and steal them. They will get them."

The law also will limit gun magazines to 10 bullets.

It gives the state police authority similar to that of the federal Bureau of Alcohol, Tobacco, Firearms and Explosives to check gun dealers' inventory to find out if there are guns missing or any that have been sold to disqualified purchasers.

State Sen. Brian Frosh, a Democrat who led the debate for the measure in the Senate, said while the law won't be a panacea for gun crime, its many components will save lives and prevent injuries.

"In sum, I think it will make a big difference, and the individual pieces will each make Marylanders safer," Frosh said.

O'Malley proposed the measure in January in response to the December shooting in Newtown, Conn., where a gunman killed 20 children and six adults.

It takes effect about two weeks after a massacre at the nearby Washington Navy Yard that left 13 dead. The fatalities included six Maryland residents and the gunman, who complained of being tormented by extreme low-frequency waves. The Maryland law attempts to address firearms access by the mentally ill by preventing anyone who has been involuntarily committed to a mental health facility from owning a handgun in the state, although this provision would not have applied to the Navy Yard gunman.

The law will also ban 45 types of assault weapons, although people who own them now will be able to keep them. That provision has contributed to record sales. The Maryland State Police received 106,772 gun-purchase applications so far this year as of Sept. 20, the most recent date for which data was available Friday. That compares with 70,099 applications processed last year, which had been the previous annual record.

"There's never been this kind of increase," said state police spokesman Greg Shipley, who added that people have been applying for gun purchases at the rate of about 1,000 a day over the past two weeks.

Frank Loane, owner of Pasadena Pawn and Gun in Pasadena, said the sweeping nature of the law has brought in scores of customers this year, including elderly ones. He noted that a 90-year-old man bought a pistol last week. Loane said it has been his best year for firearm sales in the nearly seven years he has operated his store.

"Everybody's trying to get in to either get an assault rifle or a handgun that they've always wanted, and they know the deadline is coming," Loane said.

Customers have complained about the assault weapons ban, additional paperwork and a course on gun safety they will be required to take that involves shooting at a range, Loane said. Critics note that the measure will add significant new costs for gun owners, from the cost of the training course to travel to shooting ranges.

"It's a significant burden against the exercise of a fundamental civil right, and it's going to primarily harm those people who are disadvantaged -- poor people in particular," said Patrick Shomo, president of Maryland Shall Issue, which advocates for gun rights.

Opponents also have criticized the state for being ill-prepared to handle the influx of people who want to buy guns before Tuesday; state police said Friday that they still have 53,784 applications that had not been processed as of Sept. 20.

Backlog or not, Vincent DeMarco, president of Marylanders to Prevent Gun Violence, hopes other states will look to Maryland as an example so criminals won't simply be able to buy guns in a neighboring state.

"The rest of the country should pay attention to what we're doing in Maryland," DeMarco said. "We are enacting the most effective tool a state can enact to reduce gun violence, and we encourage the rest of the country to do the same -- for their sake and ours."