Cities have been hitting the brakes on red light cameras, and no wonder. Outrage over the devices is no longer limited to angry motorists facing hefty fines. Judges have now tossed tens of thousands of tickets. Newspapers and government inspectors have exposed deep flaws in many cities’ equipment and enforcement methods. And the former CEO of one of the two major camera manufacturers was indicted on bribery and other charges related to Chicago’s red light cameras.

The backlash began in 2013. After peaking at an all-time high in 2012, when 540 U.S. jurisdictions used red light cameras, the number dropped to 503, according to the nonprofit Insurance Institute for Highway Safety. Last year the numbers dropped even further. In December, New Jersey ended a five-year pilot program that had allowed 25 municipalities to use red light cameras. The same month, Ohio Gov. John Kasich signed a law that essentially blocks the use of traffic cameras in the state.

On the legal front, a California appeals court threw out a $500 ticket in January because drivers weren’t reliably given a 3.6-second yellow light as required by law. The decision sets a legal precedent for challenging red light camera violations, but it came after the city of Riverside­ -- which had issued the ticket in question -- scrapped its cameras last summer. Meanwhile, lawyers are working on a settlement in a class-action lawsuit against 20 Missouri cities and a camera manufacturer that could lead to refunds across the state.

What’s behind the red light reversals? For one thing, there’s growing skepticism that the cameras lead to a decrease in automobile accidents. The Chicago Tribune, for example, recently commissioned a study that showed Chicago’s red light camera program did not lead to an overall reduction in crashes. Many citizens, meanwhile, see the cameras as nothing more than a way for cities to make easy money by slapping fines on drivers. Now state lawmakers, city council members and citizen activists around the country are pushing measures to curb or outright ban the cameras.

But ditching the cameras can play havoc with city budgets. When New Jersey ended its pilot program, Moody’s, the credit rating agency, warned of the impact the development could have on the two dozen municipalities that had the devices. “These developments are credit-negative,” Moody’s analysts wrote, “because they further constrain governments’ ability to implement new revenue streams at a time when these governments are facing property tax limits, uneven sales tax growth and anti-tax sentiment.”

Proponents of red light cameras insist there’s also a cost in terms of public safety. “There’s no question that lives will be lost because some communities have ended their programs,” says Russ Rader of the Insurance Institute for Highway Safety, which backs red light cameras.

One of the problems he sees is that some cities implemented red light cameras not as a safety measure, but as a revenue source. If red light cameras are set up properly, Rader argues, they may not bring in much money because motorists stop rather than run a red light. “Some communities have shot themselves in the foot. If the public believes that red light cameras are more about revenue than safety, then communities have a problem.”

Backers of red light cameras say they can be used effectively, if the cities using them base their decisions on safety and explain the benefits to their residents. Cities should place the cameras at dangerous intersections, and then monitor safety data to make sure an improvement occurs, says Michael Green of AAA, the motorists group. He says cities should post signs alerting drivers to where red light cameras are in operation. “This shouldn’t be a surprise: The goal is not to ticket a motorist,” Green says. “The goal should be to get them to stop at the red light.”