New York passed an emergency law to ban guns in public places. This follows the landmark Supreme Court decision last month that ended state restrictions.
Gun buyers must also prove that they are able to use a firearm and submit social media accounts to be reviewed.
Analysts believe that the new restrictions could lead to a new legal challenge.
This Supreme Court ruling, which effectively expands gun rights, was its most significant on guns in more than a decade.
The issue is a hot topic in the United States. It is contested mainly by Republicans who favor gun ownership, and Democrats who support stricter restrictions.
High-profile shootings at Uvalde (Texas) and Buffalo (New York) in May exacerbated political divisions.
The violence led to a rare bipartisan effort that produced the largest federal gun control bill in almost 30 years.
It makes it harder for young buyers to buy guns and encourages states not to give guns away to people they consider a threat.
The New York law, which came into effect on September 1, 2005, envisages:
“Sometimes they’re telegraphing that they intend to cause harm to other people,” New York Governor Kathy Hochul (a Democrat) said at a news conference.