For the past several months, millions of dollars’ worth of erroneously written parking violations were dismissed by New York City judges. Apparently, no one had informed the city’s Department of Finance that agents had been using the incorrect violation number on citations for wrongly displaying muni-meter receipts, according to a spokesman for the mayor’s office on Friday.

“The interagency communication breakdown that led to this error is unacceptable and new protocols have been put in place to ensure this won’t happen again,” said mayoral spokeswoman Freddi Goldstein.

Hundreds of thousands of letters went out to city residents last week, telling them that the parking tickets they’d gotten earlier in the year had been dismissed and refunded because the code number for a muni-ticket display violation was changed from 4-08h10 to 4-08h1.

When a violation number is changed, the Department of Transportation usually tells the Department of Finance, which then makes the change in the system and alerts the NYPD, Goldstein said.

But in this case, the information never made it out of the DOT.

City officials said at first, the screwup cost the city $26 million, including $18 million from drivers who had already paid for more than 400,860 of the tickets and another $8 million that was still owed, according to a report in the New York Post.

However, car owners also brought 54,329 of the tickets to court for dismissal between April and August, before the alert went out that agents were issuing the violations under the wrong number, officials admitted.

It’s certainly a long time for such a huge error to go unchecked, but it also means the city’s losses were $11.4 million more than they had calculated. It now turns out that this is the largest amount of money the city has ever lost because of an error like this, according to city officials.

“It certainly cost the city a lot of money to write those tickets and there’s a concern that, because of this, folks are not going to change their behavior,” said City Councilman Ben Kallos (D-Manhattan). “We need to make sure that when we make mistakes on tickets, we fix it quickly so that we don’t lose so much revenue.”

Officials admitted that a series of mistakes, and a lack of communication between agencies, caused the problem.

Goldstein said the city will soon implement a new protocol which will include all code changes being sent to the Department of Operations. They will then coordinate and update all other agencies.

Operations will also create a database to track changes, Goldstein said.