People visit and add to the shrine memorializing the victims of a mass shooting at the Table Mesa King Soopers store in Boulder on March 22, 2021. (Jeremy Sparig, Special to The Colorado Sun)

BOULDER — Boulder passed a package of gun control laws on Tuesday, including a ban on the sale and possession of assault weapons similar to one that was overturned shortly before 10 people were killed in a shooting at a supermarket.

Boulder originally passed an assault weapons ban in 2018 in response to the mass shooting at Marjory Stoneman Douglas High School. However, a judge declared it invalid in March 2021, ruling that only state or federal laws can limit the possession, sale and transfer of assault weapons and large-capacity magazines, the Daily Camera reported.

State lawmakers changed the law to allow cities to pass their own gun control measures partly in response to the shooting.

Authorities say Ahmad Al Aliwi Alissa legally bought a Ruger AR-556 pistol, a semi-automatic weapon with a capacity of up to 30 rounds, in his hometown of Arvada six days before opening fire at that the supermarket.

The legislation approved by city councilors also limits magazines to 10 rounds or fewer, bans ghost guns, raises the age of firearms possession to 21 and requires gun buyers to wait 10 days before obtaining a gun.

Other Colorado cities are considering or have enacted similar legislation, including nearby Louisville and Longmont.

The Associated Press