Hundreds of people rally Friday in in Annapolis to support President Barack Obama and Gov. Martin O'Malley in a fight to toughen gun ownership laws in the state. (Marvin Joseph/The Washington Post)

Gov. Martin O’Malley’s bill to repeal Maryland’s death penalty survived an early test on Friday, while hundreds of activists on both sides of the gun-control debate converged on Annapolis by the busload to weigh in on another of the governor’s top priorities.

In a day of battles on multiple fronts, aides also confirmed that O’Malley hopes to unveil a plan early next week to raise hundreds of millions of additional dollars for transportation projects, likely by imposing a new sales tax on gas.

The action unfolded amid unusually heavy security around the quaint, red-bricked state government campus. Barricades blocked surrounding streets in anticipation of a lengthy and spirited hearing at which Republican members of the House sharply questioned O’Malley about his gun-control bill that passed the Senate on Thursday.

More than 1,300 members of the public signed up to testify.

In the Senate, members started an emotional debate on whether to abolish capital punishment that is expected to conclude next week.

In a vote that suggested the bill is likely to pass, repeal supporters turned back an amendment that would have allowed executions to continue in some cases, including murders that also involved rapes.

Sen. Richard F. Colburn (R-Dorchester) recounted in graphic detail the case of Sarah Foxwell, an 11-year-old girl who was kidnapped, sexually assaulted and murdered on Maryland’s Eastern Shore in 2009.

“Just think about what happened to this poor, innocent girl,” Colburn, the amendment sponsor, told his colleagues.

His proposal failed on a vote of 19 to 27 shortly before the Senate broke for the day.

Sen. Jamie B. Raskin (D-Montgomery), who is shepherding O’Malley’s bill through the chamber, said he considered the vote an “excellent harbinger” of where senators are on the underlying legislation. The bill requires 24 votes to pass.

During Friday’s floor debate, Raskin acknowledged that there are cases such as Foxwell’s where vengeance is an understandable emotion. But he argued that “death is different” and the state cannot correct a mistake after executing someone.

“With the death penalty, there is no going back,” he said.

Kirk Bloodsworth, a former death row inmate who was later exonerated by DNA evidence, watched Friday’s debate from the Senate gallery.

O’Malley’s repeal bill would replace the death penalty with life without the possibility of parole. If it clears the Senate, the bill heads to the House, where prospects are considered strong.

A day after O’Malley’s gun-control bill passed the Senate largely intact, the effort began in the House.

The crowd at the rally — where signs included “How many Children will to die to save the NRA?” and “Save lives now” — was treated to a lofty speech by O’Malley, who also sang and prayed with the group.

“The children that were lost in Newtown are our children. The children that were lost on the streets of Baltimore are our children,” O’Malley said to applause. “We must overcome this sickness in our souls that is violence and gun violence in America.”

O’Malley faced a much different crowd in the House hearing.

Del. John W. E. Cluster Jr (R-Baltimore County) pulled out federal data on Maryland gun deaths from 2011 and raised his voice to stress that just two of nearly 400 homicides were committed with rifles.

“Where’s the correlation between assault weapons and saving lives?” Cluster asked O’Malley.

Del. A. Wade Kach (D-Baltimore County) piled on, questioning O’Malley about the math.

O’Malley said more than 400 people and 35 police officers have died nationwide since the expiration of the federal assault weapons ban in 2004.

“Our state really is too violent,” O’Malley said, citing years of soaring but finally falling homicide rates in Baltimore and Prince George’s County. “We have the highest number of PhDs in this state . . . and the greatest number in body bags from gun violence.”

The hearing also began to reveal the potential impact of scores of amendments the Senate made to O’Malley’s bill.

Jeffrey Reh, general counsel for the gunmaker Beretta, said he was flying to Europe next week to meet with members of the Beretta family about the company’s future in the state. The gunmaker’s U.S. operations are based in Prince George’s County, where it employs 300.

Reh said one change the Senate made could expose company executives to jail time for clerical errors. He was referring to an amendment aimed at holding gun dealers accountable for records of gun purchases, with two or more records errors in three years potentially leading to jail time. In Maryland, gun manufacturers are also required to register as dealers.

“We literally have millions of pages of documents of firearms transactions,” Reh said.

O’Malley’s office was officially mum Friday on the status of his forthcoming transportation plan. Senate President Thomas V. Mike Miller Jr. (D-Calvert) broke the news to the press corps that it is coming soon.

Miller has put forward his own legislation, which includes a new 3 percent sales tax on gasoline at the wholesale level. O’Malley aides said the governor’s plan is likely to include a version of that tax but did not indicate how large the new levy would be.

O’Malley and several lawmakers have said that Virginia’s passage of a transportation plan last weekend provides additional impetus from them to act.

Kate Havard contributed to this story.