By Sahil Kapur

At a campaign stop Wednesday in New Hampshire, hours after a gunman in Virginia killed two journalists during a live broadcast, Martin O'Malley promised to push for "sensible gun safety legislation" if elected president.

"My heart goes out to the family members who lost people today in Virginia. Really awful," the underdog Democratic presidential candidate said in Manchester. "I haven't seen the news footage itself but I've been told about it. Tragic and awful. No country has the problem that our country has with gun violence and lives being taken from us by gun violence."

In an interview with Bloomberg, O'Malley said the priority must be mandatory background checks for firearm purchases.

"The most important thing is background checks," he said. "And databases that are actually connected and open for law enforcement to share information."

Current federal law doesn't require criminal background checks for sales at gun shows or over the Internet, which can make it easier for criminals and dangerous mentally ill people to acquire firearms. Congress tried and failed to change that policy in 2013 after the elementary school massacre in Newtown, Conn., that left six adults and 20 schoolchildren dead.

O'Malley also expressed support for a ban on assault weapons, arguing that "combat weapons should not be available for sale and use on the streets of our neighborhoods and our cities and towns." A federal ban on sales of assault-type weapons, in place for 10 years, expired in 2004 because of congressional inaction.

The former Maryland governor touted a bill he signed in 2013 that made his state's gun laws among the strictest in the country. It banned 45 types of assault weapons, limited gun magazines to 10 bullets, required handgun buyers to provide fingerprints and prohibited firearm ownership for people who've been involuntarily committed to a mental health facility.

O'Malley, who is polling far behind Democratic rivals Hillary Clinton and Vermont Sen. Bernie Sanders, highlighted his divergence from Sanders, who is drawing enormous crowds and hefty praise from progressives for his economic proposals, but has faced criticism from the left for his mixed record on gun policies. On guns, O'Malley said he has a "big policy difference" with the Vermont lawmaker, who in 1993 voted against the Brady Bill (which strengthened background check laws and imposed a five-day waiting period for handgun sales) and, more recently, in favor of legally shielding gun makers and dealers from liability if guns they sell are used for criminal purposes.

Sanders got support from an unlikely corner: An editorial published Wednesday by the conservative New Hampshire Union Leader defended Sanders' gun record against recent criticism from Connecticut Gov. Dannel Malloy, a Clinton supporter.

Clinton also called for background checks Wednesday, declaring that "we have got to do something about gun violence in America, and I will take it on."

Reflecting the consensus in his party, Republican presidential candidate Chris Christie, New Jersey's governor and a former federal prosecutor, argued Thursday on Fox News that more gun laws aren't needed to stop violence.

O'Malley graces the latest cover of the National Rifle Association's magazine America's 1st Freedom, but the placement isn't meant to be flattering. In the blistering article, NRA Executive Director Chris W. Cox that if the ex-governor becomes the presidential or vice presidential nominee, "Americans could face a fight for the survival of Second Amendment freedom as we know it."

"I saw that!" O'Malley said, excitedly.

It's a badge of honor for O'Malley, who says the powerful pro-gun group is afraid of him.

"The NRA also tried to prevent us from passing the legislation we passed in our state, but we forged a new consensus," he said. "I think that the NRA probably sees that we're actually effective at getting sensible gun safety legislation passed, and that's why they dislike me so."

The shooting of the journalists in Virginia was the latest reminder that gun violence is on the rise nationally. The Washington Post reported Wednesday on a study that found that in 2015, mass shootings have averaged about one per day.

O'Malley reiterated a goal he unveiled earlier this month to cut U.S. deaths from gun violence in half by 2025. He has called for constitutional amendments to overturn Citizens United and protect the right to vote. Does he also want to alter the Second Amendment?

"I haven't teed up a constitutional amendment on it," he said.

(c)2015 Bloomberg News