UNION CITY — Every ticket generated by red-light enforcement cameras in the city before last Saturday will be dismissed due to a snafu — letting thousands of red-light runners off the hook and costing the city hundreds of thousands of dollars in anticipated revenue.

Police officials and city engineers discovered last week that the yellow-light duration at every one of its camera-enforced intersections was too short — in some cases by more than a second. The city began using cameras in the summer at five intersections along Alvarado-Niles Road and Union City Boulevard.

Since then, about 3,000 people have been photographed driving through red lights. With the city getting $136 for each conviction, dismissing every ticket means the city now will not receive more than $400,000 that would have gone into its general fund. Adding to the impact are the costs incurred in processing all of those tickets that now will be dismissed.

The state Department of Transportation sets the minimum amount of time that a traffic signal must remain yellow before turning red, based on the road's speed limit. For a road with a speed limit of 45 mph, such as Union City Boulevard at Lowry Road, the light needs to stay yellow for at least 4.3 seconds.

Dave Goodson knows that. The Castro Valley resident received a ticket in the mail for running that particular light. Feeling that he would not have had enough time to stop had he tried to when the light turned yellow, he started doing some research.

"I'm an engineer. I don't take this stuff lightly," he said.

Goodson found the state code where the minimum times are listed, and then wrote to the city asking how long the signal at that intersection remains yellow. E-mail replies he received from City Engineer Carlos Jocson and Michael Dalisay, the police officer who runs the red-light enforcement program, both said the same thing. The lights were set according to state standards. But both also incorrectly stated that standard as being only 3 seconds.

When first questioned by a reporter about the timing discrepancy, police officials said they believed the lights were set correctly and that Jocson and Dalisay simply had quoted Goodson the incorrect value. They promised, however, to investigate the matter.

"We had full assurance from the city engineer" that the lights were properly set, police Capt. Brian Foley said.

The investigation revealed that the yellow signal was set too short at every photo-enforced intersection. Rather than place the blame on any one individual, the investigation pointed to a process of checks — any one of which would have pointed out the problem earlier — that all failed.

Foley said he and other officials were well aware of the minimum standards and had assumed that Jocson and Dalisay also knew them. Still, city engineers are required to provide a monthly audit of the signal settings. Those audits, which would have alerted officials to the problem, were never received, he said. By 10:21 a.m. last Saturday, all of the intersections had been set to the state-required standards.

In meetings that continued late into the week, officials decided it would be best to dismiss every ticket issued before the lights were correctly reset last weekend, Foley said.

"Some of the violations were blatant. Most could have stood anyway, since they greatly exceeded the time by several seconds," he said. He added that "numerous" near collisions — and even a hit-and-run incident — were captured on the cameras' video systems.

"(The program) does generate revenue, but look at what a problem there is. Putting cops at every corner won't cut it," he said.

Only about 100 of the 3,000 people who were photographed already had either paid the $351 fine or had registered for traffic school, and they all will be reimbursed, Foley said. The others will not have to pay.

Foley also responded charges that yellow-light times were shortened when the cameras were installed in order to nab more drivers. The improper timing had been in effect well before the program began, he said.

"It was not intentional. We're not going to let anything hurt the integrity and credibility of this program," he said. "At least it's better to find out now than a year from now."