The Maryland Senate gave final approval to Gov. Martin O'Malley's sweeping gun control bill Thursday night, sending the legislation to the governor for his promised signature.

O'Malley said in a statement that the bill strikes "a balance between protecting the safety of law enforcement and our children, and respecting the traditions of hunters and law-abiding citizens to purchase handguns for self-protection."

The legislation bans the sale of assault-style weapons, requires fingerprints and a license to buy a handgun, and limits magazines to 10 bullets, among other provisions, giving Maryland one of the strictest gun laws in the nation.

Some opponents have vowed to petition the bill to referendum. If they are successful, the law would be delayed for a year and be on the ballot for Maryland voters to consider in November 2014.

The Senate voted 28-19 Thursday to accept House amendments to the legislation, which also requires gun owners to report lost or stolen firearms to police, empowers state police to audit gun dealers and bars more people with mental illnesses from buying guns.

Before the vote, Sen. Nathaniel McFadden, a Baltimore Democrat, warned criminals that authorities would crack down on them.

"Bad guys, wherever you are, especially if you are in the city of Baltimore, please don't have a comfort level," McFadden said. "We're coming to get you."

The bill, introduced by O'Malley, contains some of the most far-reaching changes any state has approved in the aftermath of the December shooting deaths of 20 schoolchildren and six educators in Newtown, Conn.

The bill would also increase the amount of information about people with mental illnesses sent to a national database for background checks, as well as bar gun ownership for people convicted of certain violent crimes but given probation before judgment.

Republicans called the measure a symbolic response to mass shootings that ignores mental health treatment and punishes only law-abiding gun owners.

"It will be celebrated as if we've done something," said Sen. Nancy Jacobs, a Republican who represents Harford and Cecil counties. "This bill does nothing."

Gun control advocates, Democrats who supported the measure and O'Malley have called the provision to license the sale of handguns the most effective way to curb the flow of guns to criminals. Giving fingerprints to state police, they said, creates a deterrent to "straw purchasers" who would otherwise buy a gun on behalf of someone disqualified from doing so.

"This bill will do something very important. This bill will save lives," said Sen. Brian Frosh, a Montgomery County Democrat who shepherded the bill through his chamber. "It will stop criminals from getting guns."

Baltimore Mayor Stephanie Rawlings-Blake applauded lawmakers' passage of the measure.

"Today, the Maryland General Assembly took decisive action to help reduce gun violence in Baltimore and throughout Maryland," Rawlings-Blake said in a statement. "In the face of tremendous pressure from special interests looking to protect the status quo, our leaders were bold and courageous."

Once signed, the law would take effect Oct. 1. Gun dealers would be allowed to sell their existing inventory of 45 makes and models of assault-style rifles that would be banned under the bill. Marylanders who place an order before that date would still be able to purchase them.

ecox@baltsun.com