Former Police Commissioner Ray Kelly is defending himself after being accused of deleting e-mails from his time in the NYPD to cover up a quota system.

Kelly’s emails are wanted in connection with a class-action lawsuit from last summer alleging a summons quota system within the department. 

So far, the city hasn't been able to produce the documents.

In a filing on Wednesday, the city said locally stored emails Kelly did send were accidentally deleted by NYPD technicians at the end of his tenure.

Kelly released a statement, responding: "I can unequivocally state I have never deleted nor ordered anyone to delete any emails relevant to this litigation.

"Moreover, as anyone who worked with me in the NYPD can attest, and have already attested in this matter, I did not manage the department by email."

Law department officials say those messages should be able to be recovered eventually.

City Hall says it does not appear that the emails were intentionally deleted.