Ten South Florida municipalities banded together Monday to challenge a state law preempting locally adopted gun restrictions.

The lawsuit against Gov. Rick Scott and other state officials was filed in Leon Circuit Court about six weeks after the Parkland high school shooting. Weston led the litigation effort after the city's mayor, Daniel Stermer, was stymied in his desire to take action on gun control.

“I had to basically tell the commission they're not allowed to do it and, if they do it, they face all these penalties,” said Jamie Cole, city attorney for Weston and Miramar and managing director at Weiss Serota Helfman Cole & Bierman.

The penalties enacted by the state Legislature in 2011 after lobbying from the National Rifle Association include removal from office without a hearing, a fine up to $5,000 to be paid out of the official's pocket and unlimited lawsuits against a municipality by anyone claiming to be adversely affected by gun regulations.

“These onerous penalties are vindictive and expressly intended to be punitive in nature,” the lawsuit claims. ”As a result, the penalties deter and chill officials from taking any actions in the area of firearms and ammunition, even in those areas where such actions are (or may be) allowed.”

The municipalities allege the penalties are improper because they violate constitutional limitations on the governor's authority over municipal officers, conflict with elected officials' and municipalities' constitutionally granted immunity, and violate the right to petition and instruct local elected officials. The lawsuit also claims the penalties are arbitrary, unconstitutionally vague and overbroad.

Weston's lawsuit was joined by Miramar, Pompano Beach, Pinecrest, South Miami, Miami Gardens, Miami Beach, Coral Gables, Cutler Bay and Lauderhill. The plaintiffs include 31 elected officials in South Florida cities with a total population of 700,000, Cole said.

The governor's office did not respond to a request for comment on the lawsuit by deadline.

Cole said Weston decided to challenge the law after hearing from constituents after the shooting at Marjory Stoneman Douglas High School on Feb. 14. Stermer, an attorney and Miami managing director of business consulting and restructuring firm Development Specialists Inc., was upset the city couldn't prohibit firearms in public buildings and parks.

“There were residents who came to speak, and they were very concerned about it,” Cole said. “They're concerned about gun safety. They believe cities should be doing things. They don't believe there should be one-size-fits-all regulations.”

Public agencies with gun-control measures in place in 2011 were forced to repeal them. For example, Palm Beach County banned guns in county government buildings and parks. Rural Groveland in Lake County banned celebratory gunfire.