A tombstone engraver made Ed Koch nearly two decades younger after carving the wrong birth year into the New York City mayor’s granite slab.

Tommy Flynn of Flynn Funeral & Cremation Memorial Centers Inc. transposed two numbers in Koch’s birth year, making him born in 1942 rather than 1924, The New York Times reported Tuesday.

Koch died on February 1 at 88. He supervised the engraving of his own tombstone except for the dates of birth and death.

The stone includes the last words of Wall Street Journal reporter Daniel Pearl, murdered by Islamist terrorists in Pakistan in 2002: “My father is Jewish, my mother is Jewish, I am Jewish.”

Flynn told The New York Times he would fix the error within three weeks.

Ed Koch's misdated tombstone (photo credit: NBC screenshot)

Ed Koch’s misdated tombstone (photo credit: NBC screenshot)

Ironically, Koch had done his best to ensure his gravestone looked exactly the way he wanted it.

As revealed in “Koch,” the documentary that open coincidentally in New York around the time of his death four months ago, the savvy politician, 88, did not want to leave the writing of his epitaph to anyone else. So he took care of it himself in advance.

In the film, Koch visits his own grave with Diane Mulcahy Coffey, his chief of staff. On the way to Manhattan’s Trinity Church Cemetery, the proudly Jewish mayor explains why he chose the Protestant burial ground as his final resting place.

With help from rabbis, he had visited old Jewish cemeteries in Manhattan, but they weren’t to his liking (and Koch had no intention of ever leaving Manhattan — even in death).

“They’re all locked up, and no one goes there,” he says in the film. “I want to be in a bustling cemetery.”