WASHINGTON -- U.S. Senate bargainers reached agreement Tuesday on a bipartisan gun violence bill, potentially teeing up final passage by week's end on an incremental but landmark package that would stand as Congress鈥 response to mass shootings in Texas and New York that shook the nation.

Lawmakers released the 80-page bill nine days after agreeing to a framework for the plan and 29 years after Congress last enacted major firearms curbs. It cleared an initial procedural hurdle by 64-34, with 14 Republicans joining all 48 Democrats and two allied independents in voting yes. That strongly supported a prediction by Senate Majority Leader Chuck Schumer, D-N.Y., of approval later this week. Passage by the Democratic-led House could follow quickly.

Though Republicans blocked tougher restrictions sought by Democrats, the accord marks an election-year breakthrough on an issue that pits the GOP's staunch gun-owning and rural voters against Democrats' urban-centred backers of firearms curbs. That makes it one of the most incendiary culture war battlefields in politics and a sensitive vote for some lawmakers, particularly Republicans who might alienate Second Amendment stalwarts.

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 to improve school safety and mental health initiatives.

Aides estimated the measure would cost around US$15 billion, which Sen. Chris Murphy of Connecticut, the lead Democratic bargainer, said would be fully paid for.

Resolving one final hurdle that delayed the accord, the bill would prohibit romantic partners convicted of domestic violence and not married to their victims from getting firearms. Convicted abusers who are married to, live with or had children with their victims are already barred from having guns.

The compromise prohibits guns for a person who has 鈥渁 current or recent former dating relationship with the victim.鈥欌 That is defined in part as one between people 鈥漺ho have or have recently had a continuing serious relationship of a romantic or intimate nature." An offender鈥檚 ability to own a gun could be restored after five years if they鈥檝e not committed another serious crime.

On another late dispute, the bill would provide $750 million to the 19 states and the District of Columbia that have 鈥渞ed flag" laws making it easier to temporarily take firearms from people adjudged dangerous, and to other states with violence prevention programs. States with 鈥渞ed flag鈥 laws that receive the funds would have to have legal processes for the gun owner to fight the firearm's removal.

Momentum in Congress for gun legislation has a history of waning quickly after mass shootings. Lawmakers are scheduled to begin a two-week July 4th recess by this weekend.

The legislation lacks far more potent proposals that U.S. President Joe Biden supports and Democrats have pushed unsuccessfully for years, 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 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 Buffalo and Uvalde, 鈥淚 saw a level of fear on the faces of the parents and the children that I spoke to that I鈥檝e never seen before.鈥 He said his colleagues also encountered anxiety among voters 鈥渘ot 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, would 鈥渟ave thousands of lives." Before entering the Senate, his House district included Newtown, Connecticut, where 20 children and six staff members perished in a 2012 mass shooting at Sandy Hook Elementary School.

Top GOP bargainer Sen. John Cornyn of Texas said of the pact, 鈥淪ome think it goes too far, others think it doesn鈥檛 go far enough. And I get it. It鈥檚 the nature of compromise."

But he added, 鈥淚 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鈥檓 confident this legislation moves us in a positive direction."

In a positive sign about its fate, Senate Minority Leader Mitch McConnell, R-Ky., voiced his support, calling it 鈥渁 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, expressed opposition. 鈥淚t 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.

Underscoring the backlash GOP lawmakers supporting the pact would face from the most hard-right voters, delegates booed Cornyn at his state鈥檚 Republican convention in Houston Saturday as he described the proposal.

In another measure of conservative sentiment, Sen. Josh Hawley of Missouri, a potential 2024 Republican presidential candidate, tweeted that the bill 鈥渋gnores the national crime wave & chips away instead at the fundamental rights of law abiding citizens.鈥 Sen. Tom Cotton, R-Ark., a possible White House contender, said it would 鈥渞estrict the freedoms of law-abiding Americans and put too much power in the hands of politicians and political officials.鈥

The measure will need at least 10 GOP votes to reach the 60-vote threshold major bills often need in the 50-50 Senate. Cornyn told reporters that he expected at least 10 GOP votes for the measure.

What鈥檚 uncertain is whether passage would mark the beginning of slow but gradual action to curb gun violence, or the high water mark on the issue. Until Buffalo and Uvalde, a numbing parade of mass slayings 鈥 at sites including elementary and high schools, houses of worship, military facilities, bars and the Las Vegas Strip 鈥 have yielded only stalemate in Washington.

鈥淭hirty years, murder after murder, suicide after suicide, mass shooting after mass shooting, Congress did nothing," Murphy said. 鈥淭his week we have a chance to break this 30-year period of silence with a bill that changes our laws in a way that will save thousands of lives.鈥

The bill would require that federal background checks for gun buyers age 18 to 20 include examination of the purchaser's juvenile record. That could add up to seven more days to the current three-day limit on background checks.

The suspects in the Buffalo and Uvalde shootings were both 18 years old, a profile that matches many recent mass shooters.

There would be hundreds of millions of dollars to expand community behavioural health centres, telemedicine visits for mental specialists and train first responders to handle people with mental health issues. More than $2 billion would be provided to hire and train staff for school mental health services, including $300 million to improve school safety.

Congress鈥 prohibited assault-type firearms in 1993 in a ban that expired after a decade, lawmakers鈥 last sweeping legislation addressing gun violence.

___

Associated Press writer Kevin Freking contributed to this report.