Democratic presidential candidate Martin O'Malley answers a question at a campaign town hall meeting in Manchester, N.H., in September. (Brian Snyder/Reuters)

ROCHESTER, N.H. — Former Maryland governor Martin O’Malley on Sunday touted a package of gun-control measures passed during his tenure and challenged his two leading rivals for the Democratic presidential nomination to embrace several initiatives on the national level.

O’Malley’s comments, in the wake of last week’s deadly shootings at a community college in Oregon, represented his latest attempt to gain traction in a race where he lags well behind Hillary Rodham Clinton -- who is set to announce some new gun-control proposals Monday -- and Sen. Bernie Sanders (I-Vt.).

“We banded together. We drove consensus,” O’Malley told a gathering of the Strafford County Democrats as he recalled legislation passed in Maryland in 2013. “We need to apply the same persistence today as a nation.”

The Maryland legislation, prompted by the 2012 school shootings in Newtown, Conn., included new fingerprinting and training requirements for handgun purchasers, as well as a ban on 45 types of assault rifles and magazines that hold more than 10 rounds.

[At end of fundraising quarter, O’Malley seeks to lessen role of money in politics]

O’Malley faced a far different legislative environment than Congress currently poses: Both chambers of the Maryland General Assembly are dominated by Democrats.

But O’Malley said lawmakers in his state faced and overcame great pressure from the National Rifle Association and held more diverse views on gun control than their party labels suggested.

“We had huge crowds descend on Annapolis. Practically closed down the hallways,” he told the gathering of more than 100 Democratic activists here. “There were many people that said the mountain was too high. We had to take on people in our own party who had some cultural affinities with North Carolina that were closer than their affinities with North Baltimore. But we did it. We never gave up.”

O’Malley, a former mayor of Baltimore, called for four reforms on the national level: a ban on “combat assault weapons”; a requirement that those who purchase guns get licenses and be fingerprinted; a law making gun trafficking a federal crime; and a commitment from the federal government to purchase firearms only from companies that use “the latest and best safety technology.”

“I know that not everyone in this room has made a decision about what candidate you will support,” O’Malley said Sunday night. “But I also know this is New Hampshire and that some of you have. So I’m asking supporters of Senator Sanders to please urge Senator Sanders to back these four common-sense provisions that I just laid out to reduce gun violence. And I am asking the supporters of Secretary Clinton to please urge Secretary Clinton to back the specific provisions that I just laid out.”

[Campaigning in Iowa, 2016 hopeful Martin O’Malley is keeping the faith]

O’Malley advisers argue that gun-control is one issue on which he can make headway with Democratic voters once they more closely examine the records of the candidates.

The issue poses a challenge particularly for Sanders. He represents a state that has virtually no gun control, and he has a mixed record in Washington, including a vote in 1993 against the landmark Brady Bill.

During a rally in Boston on Saturday night that drew more than 20,000 people, Sanders called for several additional gun-control measures, including the closing of the “gun-show loophole” on background checks. He also stressed the need to improve mental health services to keep guns out of the hands of people who shouldn’t have them.

In the aftermath of the shootings in Oregon, Clinton, a former secretary of state, called for “new effective gun control measures” and said she is willing to take on the NRA. She is expected to announce some new initiatives Monday during an appearance on NBC's "Today Show."

O’Malley was one of two Democratic presidential candidates to appear at Sunday night’s “fall social” here. Lincoln D. Chafee, a former Rhode Island governor and U.S. senator, also addressed the crowd.

Clinton and Sanders were represented by surrogates. Rep. Katherine M. Clark (D-Mass.) spoke on behalf of Clinton, while Sanders was represented by Jerry Greenfield, a co-founder of Ben & Jerry’s ice cream, based on Sanders’s home town of Burlington, Vt.