Lawyers for more than 70 elected officials argued Friday that a state law that fines them for adopting gun control laws has had a chilling effect that prevents them from even considering gun issues.

City officials are afraid to require gun owners use locks, post signs prohibiting guns in government buildings or ensure that businesses are complying with mandatory waiting periods.

“This has caused almost a freezer effect across the state,” Weston Mayor Daniel Stermer said. “There are people dead scared about it.”

Stermer, along with more than 30 cities and three counties, based primarily in South Florida, sued Florida’s governor and attorney general two months after a gunman entered Marjory Stoneman Douglas High School in Parkland and shot and killed 17 students and staff last year.

Lawyers for Gov. Ron DeSantis and Attorney General Ashley Moody, both Republicans, were in court in Tallahassee on Friday defending what has become the strongest challenge yet to the eight-year-old state law.

Backed by the National Rifle Association, the law was created by the Legislature in 2011 and signed into law by Gov. Rick Scott. It allowed public officials to be fined up to $5,000 and be removed from office if they violated the law.

The law is extraordinary. Florida’s Republican-led Legislature has for years consolidated its power by restricting the types of ordinances and policies cities and counties can adopt.

But with gun restrictions, they tacked on a critical penalty for local officials: If they pass gun ordinances, they could be removed from office.

And it’s not just potential removal from office. Local officials could face fines up to $5,000. And they can’t use their city or county attorneys’ offices to fight lawsuits, like they normally would. Instead, local officials would have to bear the costs themselves.

Gun-rights activists and companies have used the law to challenge city actions.

Last year, one company sued the City of Fort Lauderdale after it decided in the wake of the Parkland shooting not to renew the company’s gun show at the city-owned War Memorial Stadium.

And gun-rights groups used the law to sue former Tallahassee Mayor Andrew Gillum and the city after it didn’t remove an old ordinance that banned guns in city parks. A judge ruled in favor of the city, finding that while the ordinance was on the books, the city knew the ordinance was no longer valid and wasn’t enforcing it.

But a chilling effect is the intent of the law. Sponsored by former state Rep. Matt Gaetz, who’s now a Congressman, the 2011 legislation was meant to bolster a 1987 law that outlawed cities and counties from adopting their own gun laws.

In the 1980s, a number of cities and counties had gun laws that varied wildly. In Broward County, for example, someone wanting to carry a concealed weapon had to be interviewed by a psychologist and county officials and show they had a threatening job or other need to carry a weapon.

Fewer than 40 people had permits, while more than 10,000 people had permits in Duval County, where the restrictions were looser.

Last year’s lawsuit, led by cities, counties and elected officials in South Florida, argued that the penalties were so harsh and the law was so vague that local officials can’t do anything “that is even remotely related to firearms.”

“We don’t know what we can and cannot do,” Broward County Deputy County Attorney René Harrod argued.

Moreover, lawyers for the cities and counties argued Friday that the fines and suspension powers were unconstitutional.

The fines apply to local officials who “knowingly and willfully” violate the law. But to prove that, local officials would have to be taken into court and asked about their intent, something that is prohibited in the Florida Constitution.

They also argued that the Legislature can’t grant the governor new powers to remove local officials.

The state Constitution says the governor can only suspend county officials for "malfeasance, misfeasance, neglect of duty, drunkenness, incompetence, permanent inability to perform official duties, or commission of a felony” — not for violating this particular state law.

Colleen Ernst, a lawyer representing the office of Gov. Ron DeSantis, argued that the Legislature can grant the governor new abilities to suspend officials.

Leon County Circuit Judge Charles Dodson didn’t rule on the case on Friday.

This is a developing story. Check back for updates.