The New York Public Library pulled the plug on a plan to “celebrate” an extremist cop-killer at one of its Manhattan branches after The Post alerted it to the event on Thursday.

“Celebrate the life of Robert Seth Hayes,” reads the promotional poster for the event that was planned for 2 p.m. Saturday at the Countee Cullen Branch in Harlem.

Hayes died in December, a year and a half after he was paroled for the fatal 1973 shooting of Transit Officer Sidney Thompson.

“Join us to commemorate this former Black Panther Party and Black Liberation Army veteran,” reads the poster obtained by The Post, which also calls Hayes a “long term political prisoner and freedom fighter.”

Sponsors included the Northeast Political Prisoner Coalition and the Black Panther party — and the master of ceremonies was billed as Sekou Odinga, a leading Black Panther and BLA member who was convicted for his role in a 1981 shootout with police.

Thompson’s son, Steven — who was just 6 years old when his father was gunned down — told The Post he was livid.

“It’s totally outrageous that somebody who attacked society by killing my father is being memorialized in a public library,” said Steven, himself a veteran NYPD officer.

Police unions shared his anger.

“Robert Hayes was a domestic terrorist who murdered one cop and tried to kill five others,” railed Patrick Lynch of the Police Benevolent Association.

When The Post alerted the NYPL, a spokesperson insisted the event would not take place.

“The event in question was never approved and is not taking place at The New York Public Library. The library was approached about hosting a spoken-word poetry event at the Countee Cullen branch,” the rep said.

The rep claimed the library provided the organizers with a space use agreement but they never returned the paperwork.

The event was still being advertised on Facebook pages as of Thursday evening.

Hayes was paroled in 2018 after admitting responsibility and showing remorse for the murder of Thompson.

Thompson had ordered the then-23-year-old Hayes to freeze as Hayes and another BLA member, Victor Cumberbatch, leaped a turnstile at the 174th Street station in the Bronx.

Hayes opened fire on the spot, killing Thompson, the father of two young children.

Months later, he was arrested after firing a sawed-off shotgun at five cops raiding his BLA hideout in the Bronx.

He was sentenced to 35 years to life in prison.