– Municipalities that installed traffic cameras to boost revenue are scraping for cash to fill budget gaps after complaints by drivers forced them to cancel their use.

Nassau County on Long Island ended its program after speed cameras led to the issuance of more than 400,000 tickets in less than two months, opening a $90 million budget hole over the next three years. In Ohio, Dayton is cutting in half its number of police cruisers, and Linden, N.J., is shelving plans to hire more cops after both states effectively ended camera systems following a backlash from motorists.

Cameras that monitor speed and red lights have become a quick way to raise revenue for local governments. While the programs are touted as a way to make roads safer, the perception among drivers is that cities are using cameras solely to pump up their coffers, said Ohio state Sen. Bill Seitz, a Republican who opposes them.

“There’s some evidence that perhaps they do promote safety,” he said. But “the costs outweigh the benefits, and the revenue-enhancement feature of this predominates over safety.”

Ohio, New Jersey and New York’s Nassau County moved to effectively end their camera programs this month, joining a national trend. Speed cameras are already banned in at least a dozen states, according to the Insurance Institute for Highway Safety. The number of red-light camera programs in the U.S. has dropped to 469 from a high of 540 in 2012.

“They’re a political liability, but it’s an easy way to raise revenue without raising taxes,” said Howard Cure, head of municipal research at Evercore Wealth Management.

Still, relying on traffic cameras isn’t a long-term solution to revenue shortfalls because drivers eventually figure out where they are, Cure said.

In Nassau County, Republican executive Ed Mangano and legislators used the $30 million in projected annual revenue from speed cameras to help persuade a state control board to end a three-year wage freeze. Then the residents spoke up.

As many as 56 cameras positioned near schools led to 400,308 tickets in two months, triggering an outcry.

The county of about 1.4 million residents was already facing a deficit of about $200 million next year — before the program ended.

“The cameras were one of the shiny objects the county seems perpetually attracted to,” said Chris Wright, a member of the control board who voted against lifting the wage freeze in May.

Mangano and the Republican majority in the legislature have agreed to make up the $30 million by increasing a surcharge on mobile phones for 911 service, ending a subsidy to a hospital and selling billboard ad space, among other measures.

From September, when the full program began, through November, the average number of tickets issued per day dropped 64 percent.

In New Jersey, a five-year pilot program ended Dec. 16 after Republican Gov. Chris Christie opted not to renew it. Assemblyman Declan O’Scanlon, the most vocal legislator against them, celebrated with a midnight party at the Brick House Tavern & Tap near an intersection that had been watched by cameras.

For Linden, a city of 41,000, the program’s end means losing as much as $1.5 million from a $100 million budget, said Mayor Richard Gerbounka.

Linden was planning to add as many as eight police officers, he said. “You can forget about that.”

Programs in Ohio are effectively ending after Republican Gov. John Kasich signed a bill Dec. 19 that requires a police officer to be posted by every camera. Ohio’s constitution essentially blocks the state from doing an outright ban.

Dayton, a city of 143,000, will lose $1.4 million of the $150 million the city takes in annually, said Tim Riordan, the city manager. To close the gap, Dayton will cut the number of police cruisers to eight from 16 and cut its street-resurfacing program to $700,000 from $1.7 million.