WASHINGTON — Despite deep divisions that have kept Congress from passing new gun-safety laws for almost two decades, there is one aspect of gun control on which many Democrats, Republicans and the National Rifle Association (NRA) agree: the need to give mental-health providers better resources to treat dangerous people and prevent them from buying weapons.

Yet efforts to improve the country’s fraying mental-health system to help prevent mass shootings have stalled on Capitol Hill, tied up in the broader fight over expanded background checks and limits on weapons sales.

The shooting at the Washington Navy Yard by a man authorities say showed telltale signs of mental illness is spurring a push to move ahead with bipartisan mental-health policy changes. As a result, the new gun-control debate may not be over weapons but could instead focus on whether to spend more money on mental-health care.

Proponents again face an uphill push, given complex political dynamics, but they see an opening even if it remains unclear whether any changes under consideration could have headed off the latest attack, in which authorities say Aaron Alexis, a former Navy reservist, bought the shotgun he used in Virginia.

    Most Read Stories

“Given the clear connection between recent mass shootings and mental illness, the Senate should not delay bipartisan legislation that would help address this issue,” Sens. Kelly Ayotte, R-N.H., and Mark Begich, D-Alaska, wrote Wednesday in a joint statement to the Senate leadership.

The legislation they are pushing — that was held up when a more sweeping gun measure was defeated this year, despite receiving only two no votes — would establish programs to train teachers to recognize the signs of mental illness and how to defuse potentially violent situations.

Sen. Harry Reid, D-Nev., the majority leader and a strong proponent of the failed Senate plan to expand the federal background-check system, is resisting any move to advance the mental-health provisions, fearing it would be used as a fig leaf by those who oppose expanded checks while closing the door to weapons restrictions in the future.

Ayotte and Begich opposed the gun-control bill that failed in April.

Some gun-rights advocates fear the opposite: that opening discussion on mental health could be a back door to a flood of new federal gun laws.

But several senators, such as Sen. Richard Blumenthal, D-Conn., who has pushed for tougher gun laws in the wake of last year’s elementary-school massacre in Newtown, Conn., see mental-health policy as a way forward.

“Mental health is really the key to unlocking this issue,” Blumenthal said. “I’ve become more and more convinced that we should establish the mental-health issue as our common ground.”

But while state lawmakers have taken steps in recent years to make buying weapons harder for certain people showing signs of mental illness in places including New York, Connecticut and Florida, where the legislation won the blessing of the NRA, there is not serious discussion in Congress of doing so.

“If you’re having auditory hallucinations, that’s a sign of schizophrenia,” said Sen. Tom Coburn, R-Okla., referring to reports that Alexis experienced delusions.

Though someone like that should not have a gun, Coburn said, he expressed little faith that Congress could come together to write a law to fix that.

“It’s all politics,” he said. Coburn helped lead negotiations on a background-check proposal that fell apart this year.

The Veterans Affairs Department said Wednesday that during the two visits Alexis made to an emergency room in August, he seemed alert and denied being depressed or thinking of harming himself.

Similarly, Jared Loughner, who killed six people and wounded 13, including former Rep. Gabrielle Giffords, in Tucson, Ariz., in 2011, and James Holmes, who killed 12 people and wounded dozens of others in an Aurora, Colo., movie theater last year, were not barred from buying firearms under federal law, despite their own serious mental-health issues.