Senate bargainers reached agreement Tuesday on a bipartisan gun violence bill, the parties’ top two negotiators said, setting up votes this week on an incremental but notable package that would stand as Congress’ response to mass shootings in Texas and New York that shook the nation.

Nine days after Senate bargainers agreed to a framework proposal — and 29 years after Congress last enacted major firearms curbs — Senators Chris Murphy, D-Conn., and John Cornyn, R-Texas, told reporters that a final accord on the proposal’s details had been reached.

The legislation would toughen background checks for the youngest firearms buyers, require more sellers to conduct background checks and beef up penalties on gun traffickers. It also would disburse money to states and communities aimed at improving school safety and mental health initiatives.

Resolving the two final hurdles that delayed an accord since last week, the bill would prohibit romantic partners convicted of domestic violence and not married to their victim from getting firearms. And it would provide money to the 19 states and the District of Columbia that have so-called red flag laws that make it easier to temporarily take firearms from people adjudged dangerous, and to other states that have violence prevention programs.

Lawmakers released the 80-page bill Tuesday evening. Aides estimated the measure would cost around $15 billion, which Murphy said would be fully paid for.

The legislation lacks the far more potent proposals that President Joe Biden supports and that Democrats have sought for years but have been derailed by GOP opposition. These include banning assault-type weapons or raising the minimum age for buying them, prohibiting high-capacity magazines and requiring background checks for virtually all gun sales.

Yet if enacted, the election-year agreement would spotlight a modest but telling shift on an issue that has defied compromise since Bill Clinton was president.

After 10 Black shoppers were killed last month in Buffalo, New York, and 19 children and two teachers died days later in Uvalde, Texas, Democrats and some Republicans decided that this time, measured steps were preferable to Congress’ usual reaction to such horrors — gridlock.

Murphy said that after the Buffalo and Uvalde slayings, “I saw a level of fear on the faces of the parents and the children that I spoke to that I’ve never seen before.” He said his colleagues also encountered anxiety and fear among voters “not just for the safety of their children, but also a fear about the ability of government to rise to this moment and do something and do something meaningful.”

This bill, Murphy said, was a partisan breakthrough that would “save thousands of lives.” Before entering the Senate, his House district included Newtown, Connecticut, where 20 children and six staff members died in a 2012 mass shooting at Sandy Hook Elementary School.

“Some think it goes too far, others think it doesn’t go far enough. And I get it. It’s the nature of compromise,” Cornyn said.

But he added, “I believe that the same people who are telling us to do something are sending us a clear message, to do what we can to keep our children and communities safe. I’m confident this legislation moves us in a positive direction.”

Senate Majority Leader Chuck Schumer, D-N.Y., said his chamber would begin debating the measure right away and move to final passage “as quickly as possible.”

And in a positive sign about its fate, Senate Minority Leader Mitch McConnell voiced his support, calling it “a commonsense package of popular steps that will help make these horrifying incidents less likely while fully upholding the Second Amendment rights of law-abiding citizens.”

The National Rifle Association, which has spent decades derailing gun control legislation, said it opposed the measure.

“It falls short at every level. It does little to truly address violent crime while opening the door to unnecessary burdens on the exercise of Second Amendment freedom by law-abiding gun owners,” the gun lobby group said.

It seemed likely a majority of Republicans — especially in the House — would oppose the legislation.

The measure will need at least 10 GOP votes to reach the 60-vote threshold major bills often need in the 50-50 Senate. Ten Republican senators had joined with 10 Democrats in backing the framework, and Cornyn told reporters that “I think there will be at least” 10 GOP votes for the measure.