President Barack Obama has called for a transformation in US gun laws at a memorial service for the Washington navy yard shooting victims, saying, "There's nothing inevitable about it."

Obama said Americans should honour the victims of last Monday's shooting by insisting on a change in gun laws. "It ought to obsess us," Obama said.

"Sometimes I fear there is a creeping resignation that these tragedies are just somehow the way it is, that this is somehow the new normal. We cannot accept this."

He said no other advanced nation endured the kind of gun violence seen in the United States, and blamed mass shootings on laws that fail "to keep guns out of the hands of criminals and dangerous people".

"What's different in America is it's easy to get your hands on a gun," he said.

He acknowledged "the politics are difficult," a lesson he learned after failing to get expanded background checks for gun buyers through the Democratic-controlled Senate this spring.

"And that's sometimes where the resignation comes from: the sense that our politics are frozen and that nothing will change. Well, I cannot accept that," Obama said. "By now, though, it should be clear that the change we need will not come from Washington, even when tragedy strikes Washington. Change will come the only way it ever has come, and that's from the American people."

Obama joined military leaders in eulogising the 12 victims killed in last Monday's shooting.

The invitation-only crowd included about 4,000 mourners, with the victims' tearful, black-clad family members directly in front of the speakers' stage. The president and first lady met the families privately before the service, White House officials said.

Authorities say the man responsible for the shooting was Aaron Alexis, a 34-year-old former navy reservist and information technology contractor who struggled with mental illness. Police killed Alexis in a gun battle.

By the end of the day, the Senate's chief gun control proponent, California Democrat Dianne Feinstein, was calling on her colleagues to restart the debate on gun control and "do more to stop this endless loss of life".

Obama didn't speak out on the issue until Saturday night at a Congressional Black Caucus Foundation dinner when he urged people "to get back up and go back at it" to push the gun control legislation that stalled in the Senate. Obama proposed the legislation in the aftermath of the elementary school shooting in Newtown, Connecticut, that killed 20 first-graders and six staff members.

But Senator Joe Manchin, the co-author of the bill to expand background checks, acknowledged the bill remained stalled in the Senate. The Democratic senator told CBS he had no intention of renewing his effort to pass the measure in light of the navy yard shootings unless he saw movement on the part of the opponents of the bill.

"I'm not going to go out there and just beat the drum for the sake of beating the drum," he said. "There has to be people willing to move off the position they've taken, and they've got to come to that conclusion themselves."

The National Rifle Association's cxecutive vice-president Wayne LaPierre responded to the navy yard shootings by calling for greater efforts to identify and lock up dangerous mentally ill people. He said the US mental health system was "in complete breakdown".

The military leaders who spoke before Obama at the memorial service, including defense secretary Chuck Hagel, navy secretary Ray Mabus and Admiral Jonathan Greenert, chief of naval operations, avoided any mention of gun control. But Washington Mayor Vincent Gray spoke forcefully for action, mentioning that one of the navy yard victims, Arthur Daniels, had already lost his 14-year-old son to gun violence and citing a string of mass public shootings in recent years.

The service ended with a bugler playing taps and singing of the navy hymn after a reading of the names of the dead.

Obama mentioned each victim, and said memories of them would go on, along with "the sense that this has happened before".

"What wears on us, what troubles us so deeply as we gather here today, is how this senseless violence that took place in the navy yard echoes other recent tragedies," he said. "As president, I have now grieved with five American communities ripped apart by mass violence: Fort Hood, Tucson, Aurora, Sandy Hook and now the Washington navy yard. These mass shootings occur against a backdrop of daily tragedies as an epidemic of gun violence tears apart communities across America, from the streets of Chicago to neighbourhoods not far from here."