Updated

Gov. Martin O'Malley urged lawmakers on Wednesday to pass a comprehensive gun control measure in Maryland, as hundreds of residents came to the state capital to either support the bill or denounce it as an erosion of the Second Amendment's right to bear arms.

President Barack Obama, meanwhile, also was in Annapolis, where he met with U.S. Senate Democrats behind closed doors at a hotel as he tries to sell them on his strategies for taking up gun control, immigration and financial concerns.

O'Malley, a Democrat who has made the gun control proposal a top priority this legislative session, wants to ban assault weapons, strengthen licensing requirements for handguns, increase school security and address mental health issues related to firearms access. The governor's push follows the December massacre at an elementary school in Newtown, Conn., where a gunman killed 20 children and six adults before committing suicide.

"This is not about ideology. This is about public safety," O'Malley told the state Senate Judicial Proceedings Committee. "This is about doing reasonable things that work to save lives and prevent, hopefully, the sort of slaughter that our country sadly has been a witness to far too often in recent months and years."

Opponents held a large rally that filled Lawyer's Mall next to the governor's residence and the Maryland State House before the hearing.

"I think they're reacting in the wrong manner," said Lou Levy of Parkton. "They're trying to legislate the guns instead of the people that are doing the bad deeds. It's pretty much that simple."

The licensing changes have drawn some of the strongest criticism so far. It would require handgun owners to be fingerprinted by police.

Sen. Nancy Jacobs, a Harford County Republican, and gun owners took particular issue with the licensing provision.

"We should not be licensing people on the off chance that they might do something wrong," Jacobs said.

Baltimore County State's Attorney Scott Shellenberger said the proposed licensing requirements are important tools in preventing people from buying guns for others who are not allowed to have them.

"I think it is a reasonable restriction in order to make sure that guns don't get into the hands of the wrong individuals," Shellenberger said.

Senate President Thomas V. Mike Miller, D-Calvert, said earlier in the day that the votes were there to pass a bill, but he noted senators were divided over the licensing provision, and he suggested separating the proposal into a separate measure.

"Some parts of the governor's bill will be tweaked," Miller said. "Some parts might be omitted, but we're going to move forward with a gun package in the Senate."

The governor's proposal also includes provisions to address mental health issues. For example, people who are in a guardianship because they have been deemed unable to make decisions for themselves would be prohibited from owning a firearm. Residents under civil commitment who have been identified as posing a risk of violence also would be prohibited from having firearms access.

"The goal is to expand prohibitions for individuals with mental illness owning firearms to protect the public without stigmatizing the mentally ill or interfering so dramatically with clinical care that individuals become afraid to seek treatment because such unintended consequences could actually increase the potential for violence as well," said Maryland Secretary of Health and Mental Hygiene Joshua Sharfstein.