Months of deadly mass shootings are pushing mental-health legislation forward in Congress, with advocates and lawmakers describing a momentum for change that they haven’t seen for nearly a decade.

Early this month, by sheer coincidence, leaders of five advocacy groups met with the head of a powerful House committee just hours after a student opened fire at an Oregon community college. As pictures of the campus flashed on the TV screen in his office, Energy and Commerce Committee Chairman Fred Upton (R.-Mich.) promised to make mental-health reform a priority this fall.

“He told us, ‘We’re going to work on this . . . Democrats and Republicans are going to work together,” recalled Paul Gionfriddo, the president of Mental Health America.

This shift in prospects comes against a complicated backdrop. The politics behind mental-health legislation have long been tangled up with the politics of gun control on Capitol Hill. And with little change on the latter, advocates and congressional Democrats remain reluctant to have mental-health measures be seen as the sole response to escalating gun violence, in part because they don’t want to perpetuate inaccurate stigmas about the mentally ill being more dangerous.

Headway also has been stymied by deep disagreements over how to best change the mental-health system. Families of individuals with severe mental illness usually want greater ability to intervene, including mandated treatment; legal advocacy groups, as well as many patients, emphasize prevention and early identification, better access to care and broad civil rights protections. None of it would come cheaply, with cost another hurdle.

In his House testimony in support of mental health care reforms, Va. state Sen. Creigh Deeds describes his experience seeking help for his late son. (Gillian Brockell/The Washington Post)

But nearly three years after 26 children and staff members were killed at Sandy Hook Elementary School in Connecticut — a mass shooting that prompted no congressional action on either guns or comprehensive mental-health legislation — enough groundwork has been laid that the latest horrors in South Carolina, Louisiana, Virginia, Oregon, Arizona and Texas may become a collective turning point.

“Those of us who want reform would be fools to ignore the political moment that exists,” said Sen. Chris Murphy (D-Conn.).

Two bills are lawmakers’ prime focus as they return to Washington on Tuesday. Both are drawing increasingly bipartisan support, although their sponsors don’t minimize the difficult road still ahead.

The House measure was first introduced in 2013 by Rep. Tim Murphy (R-Pa.), a child psychologist, and was stalled until recently. In the Senate, a newer companion effort from Chris Murphy and Sen. Bill Cassidy (R-La.), a physician, is scheduled for a hearing next week. It will be the first Senate hearing on mental health since Sandy Hook.

Each bill would remove barriers for Medicaid funding of mental-health treatment, including a rule that blocks a patient from receiving physical and behavioral-health services on the same day. They also would fund more psychiatric beds in hospitals nationwide, establish an assistant secretary for mental health and address privacy restrictions to help families receive more information about a loved one’s condition and treatment.

During a June hearing on the House bill, Virginia state Sen. R. Creigh Deeds described how the lack of such detail prevented him from helping his 24-year-old son, Gus, who had struggled with bipolar disorder. The young man turned on his father in 2013, repeatedly stabbing him before killing himself.

“Even though I was the one who cared for him, I was the one who fed him, housed him, transported him, insured him, I was not privy to that information that could clarify for me his behaviors, his treatment plan, his symptoms,” Deeds testified.

The House measure puts more emphasis on and provides incentives for “assisted outpatient treatment,” a controversial approach adopted in many states that requires patients with severe mental illness such as schizophrenia to receive treatment even when they are not hospitalized. In response to critics, Tim Murphy modified earlier language that had linked that with funding for states. The Senate bill does not have parallel incentives.

Neither measure has a price tag attached or any suggestion of how it would be afforded.

Without playing down the divisions that remain, Gionfriddo said Thursday that advocacy groups “are united in our belief that a comprehensive bill is needed this year and that the House and Senate bills offer a reasonable framework for moving forward.”

His organization and 22 others made the same point in a letter this month to Upton and Rep. Frank Pallone Jr. (N.J.), the ranking Democrat on the Energy and Commerce Committee. Their intent was to keep the pressure on the committee, which has jurisdiction over health legislation, and to signal that if Congress reached a compromise on reform, advocates representing the wide range of mental-health constituencies would be able to work out their own differences.

“This is the key time,” Gionfriddo stressed.

Passing legislation to improve mental-health care has been a priority for House Republicans since the Sandy Hook shooting in December 2012. Given the GOP’s resistance to approving new restrictions on firearms, reforming the mental-health system seemed like an alternative that would satisfy public calls for action.

Murphy was given the job of drafting a bill. He held hearings over more than a year to make the case for reform, and many witnesses were family members of severely ill people who recounted being fearful for their lives.

Yet his first legislation hit an impasse last spring. He could not find ways to compromise with Democrats, who tended to side with groups representing the interests of patients and supported more early intervention to prevent mental-health crises. GOP leadership was unwilling to bring the bill to the floor amid the controversy.

Many on the Hill say the atmosphere has changed markedly. “It’s coming to a crescendo because members of Congress are finally realizing that they have to take action and deal with this as a public health crisis,” said Susan Mosychuk, chief of staff to Tim Murphy. “There is no compassion for people with schizophrenia or severe bipolar illness, and that is why we are in the position we are in.”

During their Oct. 1 discussion, advocates say, Upton pledged to adopt the same bipartisan approach on Murphy’s bill that Energy and Commerce used earlier this year on a massive package to accelerate the development of breakthrough drugs. That package ultimately passed the House by a vote of 344 to 77.

Upton indicated late last week that he is intent on the same outcome, too.

In a statement, he said mental-health reform has been a personal and committee priority “for quite some time.” In recent months, “we have made real progress on the legislation, and I look forward to moving the bill forward this fall.”

He is still reflecting on the tragic serendipity of his meeting with the advocacy groups. The best way forward “is to hear directly from those who know best — in this instance, that means the folks dedicated to speaking for those with mental illness,” Upton said. “Listening to them as we heard of yet another tragedy unfolding in Oregon only reiterated our commitment to this cause.”

Elise Viebeck contributed to this report.