The city council of Boulder, Colorado has voted to ban semi-automatic rifles – a weapon used in several recent US mass shootings.
The military-style rifle is carried by soldiers around the world, and is legally available for adults to purchase throughout the US.
The city council on Tuesday unanimously passed the measure, which also bans high-capacity ammunition magazines.
Gun rights advocates say they plan to challenge the new law in court.
The move comes three months after a school shooting in Parkland, Florida left 17 people dead. The attack renewed a national debate on gun control and large-capacity magazines, but no federal action was taken.
Following the Parkland shooting, US President Donald Trump proposed a ban on bump stocks – which enable assault-style rifles to shoot hundreds of rounds a minute – to the US Department of Justice.
The public comment period on the bump-stock ban proposal expires on 27 June.
Boulder officials banned bump stocks, which entered the US gun debate after 58 people were killed and more than 850 injured in a Las Vegas shooting last year.
The bill describes assault-style rifles as “semi-automatic firearms designed with military features to allow rapid spray firing for the quick and efficient killing of humans”.