Despite a court order to preserve his emails, most of former Police Commissioner Ray Kelly's electronic correspondence stored on his desktop computer was deleted, according to a published report.

The city was served with a "litigation hold" to preserve potential evidence in a class action lawsuit regarding alleged summons quotas in the NYPD, the New York Daily News reported.

In documents filed in Manhattan Federal Court Wednesday, the city acknowledged the deletion but said the emails were destroyed mistakenly.

“The majority of former Commissioner Kelly’s locally stored emails were inadvertently deleted at the conclusion of his tenure,” city lawyers wrote in court papers, according to the paper.

Kelly previously swore under oath that he rarely used email, the paper reported. The emails that were deleted were more than three years old and may have been stored on a desktop computer and not on the NYPD's server, the court papers said.

Elinor Sutton, an attorney for the plaintiff in the case said the city had changed its story on the emails twice within two days.

“The city has still not provided a coherent story as to why it has not produced a single email from Ray Kelly’s file,” she told the Daily News.