Officers Stephen Gerwer, 39, and Vincent Adinolfi, 40, both assigned to the mid-island 122nd Precinct, wrote more than 40 bogus summonses last May.

But they threw away the parts of the summonses that would have gone to the motorists and to the Department of Motor Vehicles in Albany.

That left a third portion of the summonses, which was filed with the police department.

Since the DMV in Albany never got copies of the tickets, there were no official records of them — and no one at DMV went after the motorists for not paying them.

But the portions of the tickets filed with the police department were enough to convince NYPD number-crunchers that Gerwer and Adinolfi were busily enforcing traffic laws on overtime shifts between May 5 and May 20, said sources.

Until the officers got caught.

Higher-ups got suspicious when the two officers — who knew full well that no one would challenge the tickets — failed to appear at appeal sessions automatically scheduled when the tickets are submitted, law enforcement sources said.

The two officers turned themselves in yesterday, and were released on their own recognizance after appearing in Staten Island Criminal Court.

Gerwer is accused of writing 37 fake tickets, and charged with 37 counts of tampering with public records, 37 counts of offering a false instrument, and 37 counts of official misconduct, among other offenses.

Adinolfi is accused of writing 10 fake tickets, and is charged with 10 counts of tampering with public records, 10 counts of offering a false instrument, and 10 counts of official misconduct, among other offenses.