Members of the US Congress on Friday sent President Joe Biden the first major gun control bill in decades in a move the president said will make it safer for children in schools.
The House of Representatives approved the legislation mostly along party lines a day after a Republican group of senators joined all Democrats to assure the bill's passage.
The gun legislation does not include the stricter measures Democrats have championed, but would toughen requirements for younger people to purchase firearms and temporarily keep the weapons out of hands of people deemed to be dangerous.
“We're so proud of this legislation. Again, we don't judge it for what it doesn't do, but respected what it does, and what it does,” House Speaker Nancy Pelosi told reporters.
Mr Biden is expected to sign the bill into law.
However, the bipartisan agreement comes at a time when the Supreme Court has broadly expanded gun rights by ruling that Americans have a constitutional right to carry handguns in public for self-defence.
“This bipartisan legislation will help protect Americans. Kids in schools and communities will be safer because of it,” Mr Biden said.
The US has the highest gun ownership per capita in the world and the highest number of mass shootings annually among wealthy nations.
The modest bill's most important change on gun ownership would tighten background checks for those who want to buys guns if they have been convicted of domestic violence or significant crimes as juveniles.
Republicans refused to compromise on more sweeping gun control measures favoured by Democrats including Mr Biden, such as a ban on assault-style rifles or high-capacity magazines.
“This is not a cure-all for the ways gun violence affects our nation, but it is a long overdue step in the right direction,” Democratic Senate Majority Leader Chuck Schumer said on the floor before the vote.
The Supreme Court ruling earlier on Thursday, pushed through by its conservative majority, struck down New York state's limits on carrying concealed handguns outside the home.
The court found that the law, enacted in 1913, breached a person's right to “keep and bear arms” under the US Constitution's Second Amendment.
The Senate action came weeks after an impassioned speech by Mr Biden, in which he declared “enough” of gun violence and urged politicians to act.
Polls show that a majority of Americans support some new limits on firearms, demands that typically rise after mass shootings such as those that occurred in Texas and New York.
Democrats issued a warning that the Supreme Court ruling on Thursday could have dire consequences for gun safety nationwide.
“The Supreme Court got the ruling wrong,” Chris Murphy, the lead Democratic negotiator on the gun safety legislation in the Senate, said in an interview.
“I'm deeply worried about the court's willingness to take away from elected bodies the ability to protect our constituents and that has real grave implications for the safety of our country,” said Mr Murphy, whose home state is Connecticut, where 26 people were killed in a 2012 shooting at a primary school.
Thousands killed in gun violence this year
More than 20,800 people have been killed in gun violence in the US in 2022, including through murder and suicide, said the Gun Violence Archive, a non-profit research group.
The bill provides funding to help states to adopt “red flag” laws to keep firearms out of the hands of those deemed a danger to themselves or others.
It would also fund alternative intervention measures in state where red flag laws are opposed and provide for enhanced school security.
In addition, it closes the “boyfriend loophole” by denying gun purchases to those convicted of abusing intimate partners in dating relationships. However, if they have no further convictions or penalties, they will be allowed to purchase again.
The legislation also allows states to add juvenile criminal and mental health records to national background check databases.