Several thousand Marylanders went to Annapolis to voice their opinions on gun control Wednesday as the General Assembly began considering Gov. Martin O'Malley's sweeping proposal to impose new limits on the purchase of firearms.

At a hearing before a Senate committee, O'Malley urged state legislators to approve what he called a comprehensive approach to curbing gun violence. He called for a ban on the sale of "military-style" assault weapons and high-capacity magazines, and said the state should require licensing and training for handgun buyers.

The Democrat said his proposal would not infringe on legitimate gun ownership and would protect the rights of hunters.

"This is not about ideology. This is about public safety. This is about doing reasonable things to save lives," he said.

The governor's testimony before the Senate Judicial Proceedings Committee came after at least 1,500 gun-rights advocates rallied outside the State House in opposition to the legislation. They held signs that read "This is Not Nazi Germany" and "Gun Control: Want Mine? Better Brings Yours!" Among them was a contingent of 50 Allegany County residents who chartered a bus and rode for 21/2 hours to join the protest.

Meanwhile, advocates on either side of the issue packed the hearing room and an overflow room downstairs. Hundreds more stood in a line that extended down a stairway to the floor below.

Legislative aides said they had never seen such an outpouring of people seeking to testify on a bill. By an overwhelming number, they were signing up in opposition to the governor's proposal.

Sen. Brian E. Frosh, a Montgomery County Democrat and the panel's chairman, said he would allot four hours of testimony to each side in a marathon hearing that continued into the evening. Even then, he said, there would not be enough time to hear from everyone who signed up to testify.

O'Malley's proposal would add 45 assault-type rifles and their copycats to a state law that already bans the sale of assault pistols. The bill would limit magazines to 10 bullets, half the current cap. People who already own a newly banned assault-type rifle as of Oct. 1 could keep it but would have to register it with the Maryland State Police and pay a $15 fee.

While supporters are hopeful about passing a ban on assault-type weapons, a more sweeping licensing requirement is proving more controversial and has not drawn support from conservative Democrats. Leading Senate Democrats have said the governor's bill might have to be broken into pieces if any provisions are to pass.

Under the plan, handgun licenses would cost $100 and be valid for five years, and a background check would still have to be conducted with each gun purchase. Applicants would have to complete an eight-hour safety training course, undergo a more extensive background check and be fingerprinted for state police records. Under current law, gun buyers must watch a 30-minute online video.

The licensing system, which would apply only to handguns, and not hunting rifles or shotguns, would cost $3.4 million to set up but would collect $7.2 million its first year, according to an analysis by the Department of Legislative Services.

Five states and the District of Columbia have such licensing programs, according to Daniel Webster, director of the Johns Hopkins Center for Gun Policy and Research. Missouri repealed its licensing requirement in 2007, he told lawmakers, and subsequently saw its gun homicide rate go up.

Advocates for such licensing requirements say they deter "straw" purchases by people buying for others, keeping guns out of the hands of criminals. They say licensing is the most effective provision in O'Malley's gun-control package, which also would require that guns purchased outside Maryland be registered in the state within 30 days.

Baltimore County State's Attorney Scott Shellenberger said the requirement that people be licensed and fingerprinted to buy a handgun would be an effective deterrent to illegal purchases.

The prosecutor was challenged by Sen. Nancy Jacobs, a Harford County Republican. "We should not be licensing people on the off chance they might do something wrong," she said.

And Sen. Christopher B. Shank, a Washington County Republican, pointed out that state law already makes it a crime to purchase guns for someone not eligible to own one and asked why that did not appear to be working.

Gregg Bernstein, the Baltimore state's attorney, said the law does not carry stiff enough penalties and is hard to enforce. He endorsed the governor's licensing proposal, saying it would discourage relatives or friends with no criminal records from buying weapons for someone else.

Some witnesses offered rambling critiques of Maryland's existing firearms laws or gun control in general, but others had specific objections to provisions of the governor's bill.

Sonia Mangum of Stevensville expressed concern that if attacked, she might need more than 10 rounds in a magazine — O'Malley's proposed limit — to protect herself.

"If I'm under duress, I'm going to be missing and may not have time to reload," she said.

Stephen Schneider of the Maryland Licensed Firearms Dealers Association, based in Towson, said gun licensing and the weapons ban would cause gun shops to lay off employees and close. He said the state has some of the strictest gun controls in the nation and that more restrictions "will not make us safer."

Senators also heard from Jeff Reh, a director of Beretta U.S.A. Corp. of Accokeek, a firearms manufacturer and distributor that is a major employer in Senate President Thomas V. Mike Miller's home turf in southern Prince George's County.

Reh testified that Beretta was committed to Maryland but issued a veiled threat to leave if the bans on assault-type weapons and high-capacity magazines are adopted.

"We are confronted with a state government that wants to ban our products at a time, by the way, when numerous other state governments are courting our investment."

Maryland Attorney General Douglas F. Gansler joined a parade of law enforcement officials speaking in favorof the governor's bill, arguing for what he called "reasonable" regulations of gun ownership.

"Most people believe today you shouldn't be able to own grenades or drive a tank down Pratt Street," he said. "I see no reason why anyone should have assault weapons."

Gansler also endorsed the other provisions of O'Malley's bill, including the proposed licensing requirement for owning handguns.

"We ask folks to get a license to drive a car and get some training before they do," he said. Later in the hearing, a representative of the National Rifle Association countered that driving a vehicle was not mentioned as a right in the U.S. Constitution.

Baltimore County Executive Kevin Kamenetz spoke in favor of the ban on assault-type weapons, recalling two gun incidents in county schools last fall, one in which one student shot another student with a shotgun.

"This is not a cure-all here," he said. "If the 15-year-old at Perry Hall [high school] had come in with an assault weapon, we would have been Newtown."

Baltimore's police commissioner, Anthony W. Batts, also spoke emphatically in favor of licensing. He recalled growing up in a tough part of Los Angeles where he saw guns "taking lives." While he was supportive of a right to own a gun for self-defense, he asked, "Are we willing to do anything to keep young people safe in our communities?"

Some legislative leaders have suggested that the governor's bill should be broken into separate pieces. But Stacy Mayer, O'Malley's chief legislative officer, said the administration prefers to keep the package as one.

In the House of Delegates, Speaker Michael E. Busch has sent it to two committees, increasing the chances that the bill will get to the floor. Busch also formed a work group of 15 lawmakers who have been getting private briefings from gun-control advocates, gun manufacturers and public safety experts.

Another part of O'Malley's plan aims to keep guns away from people with mental illnesses by more often requiring reporting to the state when patients are treated. The information would be sent to the state and federal databases consulted during background checks and would disqualify about 2,000 people each year from gun ownership in Maryland, according to the Department of Mental Health and Hygiene.

It would also put into a federal database the names of about 50,000 people who are now prohibited from buying guns in Maryland but who currently could clear a background check in another state.

Gov. Martin O'Malley's proposal to require handgun licenses would make the state more than twice as much as it would cost to administer the program, according to a Department of Legislative Services analysis released Monday night.

For Teresa DeShields, the 75-cent-an-hour increase in the state's minimum wage that takes effect Thursday means she'll finally be able to afford a phone line in her Cedonia home to stay in touch with her family in Delaware.

Advocates for programs spending state dollars on stem cell research or investment in technology companies were nervous about what Gov. Larry Hogan's budget would hold for them, given warnings of "strong medicine" to cure fiscal woes.