The state legislature has voted to remove gravity knives from the list of weapons a person can be charged for carrying.

This comes less than two months after a federal judge banned the knives in the city.

Advocates have said that a law allowing someone to be charged with a felony for carrying such a knife targeted working class people and people of color for prosecution.

In a statement, the city police department urged Gov. Andrew Cuomo to veto the legislation.

"Gravity knives are in reality rapidly-deployable combat knives. With more than 1400 stabbings and slashing in New York City so far this year, we need Albany to work with the NYPD to keep crime low and people safe," an NYPD statement told NY1.