Joe Biden lambasted as "unconstitutional" a decision by the US Supreme Court to allow all Americans to carry concealed guns in public.
The ruling was the biggest expansion of gun rights in more than a decade, and represented a major setback for the US president's attempts to restrict access to firearms.
Mr Biden said: "I am deeply disappointed by the Supreme Court's ruling. This ruling contradicts both common sense and the constitution, and should deeply trouble us all."
Meanwhile, Eric Adams, the Democrat mayor of New York, warned America's most populous city could become the "Wild West," with anyone now allowed to carry a concealed weapon on the streets with no permit or training.
Mr Adams said the ruling may have "opened an additional river feeding the sea of gun violence."
The 6-3 ruling saw the nine-member court's conservative and liberal justices divided along ideological lines. The three justices nominated by Donald Trump - Neil Gorsuch, Brett Kavanaugh and Amy Coney Barrett - each voted to allow the expansion of gun carrying.
Kirsten Gillibrand, the Democrat senator from New York, and an ally of Mr Biden, said: "This is clearly an activist Supreme Court.
"This is what Donald Trump intended, to stack the court with ultra, extreme conservative justices who are so far out of step with the American people."
In a separate ruling, expected in coming days, the court may also overrule Roe v. Wade, the 1973 ruling which established the nationwide right to abortion.
The gun ruling was the Supreme Court's first major decision on the Second Amendment - which enshrines the "right to bear arms" - since 2010, when it established the right to keep a gun at home for self-defence.
The latest case was brought by two gun owners and backed by the National Rifle Association, America's biggest pro-gun organisation.
It sought to overturn a New York state law, enacted in 1913, which requires people to demonstrate reasons why they need to carry a handgun in public places, and then qualify for a permit.
While concealed weapons can already be carried in some Republican-governed states, others including California, Massachusetts and New Jersey have laws similar to the one in New York.
In the ruling, Justice Clarence Thomas wrote that the constitution protects "an individual's right to carry a handgun for self-defence outside the home".
It means individual states will be prevented from imposing restrictions.
The ruling was a stunning victory for the NRA.
Wayne LaPierre, the NRA's executive vice president, said: "Today's ruling is a watershed win for good men and women all across America, and is the result of a decades-long fight the NRA has led.
"The right to self-defence, and to defend your family and loved ones, should not end at your home."
Kathy Hochul, the Democrat governor of New York state, said it was "absolutely shocking".
She said: "We can have restrictions on speech - you can't yell fire in a crowded theatre - but somehow there's no restrictions allowed on the Second Amendment."
Gavin Newsom, the Democrat governor of California, said: "A dark day in America. This is a dangerous decision from a court hell-bent on pushing a radical ideological agenda. Shameful."
Eric Gonzalez, the Brooklyn district attorney, said: "The Supreme Court’s decision to open the door for millions of New Yorkers to carry a concealed weapon is a nightmare for public safety.”
It came amid a surge in gun crime, and followed a series of mass shootings, including one at a primary school in Uvalde, Texas in which 19 children and two teachers were killed.
The US Justice Department, which is responsible for enforcing US federal law, said it disagreed with the Supreme Court.
In a statement it said: "We respectfully disagree with the Court’s conclusion."
Congress has been working on potential new gun laws following the recent mass shootings.