There isn’t just one moment that inspired Cincinnati Mayor John Cranley (D) to sue the state of Ohio this week. But last September’s shooting at the Fifth Third Center building, which resulted in the death of three victims and injured two more, “added fuel to the fire” on the need to protect his community, Cranley told HuffPost.

“The fact is, [the shooter] shouldn’t have been able to buy a gun,” Cranley said.

The gunman, whose family had previously tried to commit him to a mental health facility in Florida, had legally purchased a semiautomatic handgun. A “red flag law,” which allows family members or the police to ask the state to temporarily ban specific individuals from obtaining and possessing firearms, would have prevented him from doing so.

But under Ohio House Bill 228, Cincinnati is banned from passing such a red flag measure — or any other gun restrictions. Now, the city is joining others to challenge that law so local officials can enact gun safety policies as they see fit.

“The City ... is ready and willing to enact common-sense gun regulations to stem the tide of violence, yet state law has unconstitutionally infringed upon the City’s right to do so,” Cincinnati’s complaint reads.

H.B. 228, which state legislators passed last December and which went into effect at the end of March, preemptively blocks Ohio cities from enacting legislation meant to prevent gun violence and imposes financial penalties on those who do. In addition to banning red flag laws, it bars cities from setting certain zoning restrictions on gun stores and manufacturing sites and from mandating that people convicted of domestic violence can’t have firearms in the city.

Cincinnati filed its lawsuit against the state in the Hamilton County Common Pleas Court on Thursday, following suits filed by Columbus and other Ohio cities.

According to the Cincinnati complaint, Ohio “acted unconstitutionally and illegally” by passing H.B. 228. The law “stands in the way of specific legislative steps that the City seeks to take” to protect its citizens from gun violence, the complaint reads.