NEW YORK (PIX11) — On the same day the alleged Buffalo shooter pleaded not guilty to gunning down 10 people inside a supermarket last month, the New York Legislature responded by passing sweeping new gun legislation. 

“We have done a lot. On a national level, they are talking about the things we’ve already done,” state Senate majority leader Andrea Stewart-Cousins said.

The Legislature voted along party lines. The legislation bans anyone under the age of 21 from buying or possessing a semi-automatic rifle. Additionally, folks who want to buy a semi-automatic rifle need to first obtain a license, which was previously only required for handguns.

Gov. Kathy Hochul was expected to sign the bills into law on Friday.

“This comprehensive package will close loopholes, give law enforcement the tools they need to prevent easy access to guns, and stop the sale of dangerous weapons to 18-year-olds,” she said.

The law will also restrict civilians from buying body armor similar to what was used by the alleged shooter in Buffalo. Another major change will help law enforcement solve crimes: New guns will have to feature the ability to micro stamp serial numbers on shell casings.

“When the gun is fired, the casing falls on the ground and law enforcement can use that number to track the gun’s owner,” Rep. Linda Rosenthal said.

Lawmakers in the state explained why the recent move was necessary.

“These types of guns that are used in these horrific mass shootings, we don’t have a federal law and New York needs to fill the void with this legislation,” Sen. Brad Hoylman said.

Many Republicans opposed the new gun restrictions, arguing they’d inconvenience law-abiding gun owners.

“If we want to protect our children in schools, we should fund and mandate an armed SRO in every single school building in New York State,” Sen. George Borello said.