A bipartisan package of modest gun safety measures passed the U.S. Senate late on Thursday, even as the Supreme Court broadly expanded gun rights by ruling Americans have a constitutional right to carry handguns in public for self-defense.

The landmark court ruling and Senate action on gun safety illustrate the deep divide over firearms in the United States, weeks after mass shootings in Uvalde, Texas, and Buffalo, New York, killed more than 30 people, including 19 children.

The Senate bill, approved in a 65-33 vote, is the first significant gun control legislation to pass in three decades, in a country with the highest gun ownership per capita in the world and the highest number of mass shootings annually among wealthy nations.