It may be an investigative longshot, but it’s good to see Police Commissioner Ray Kelly following through on his promise to launch a new all-out probe into the controversial 1972 killing of one of New York’s Finest.

The slaying of Patrolman Philip Cardillo inside the Harlem Nation of Islam mosque then run by Louis Farrakhan remains a shameful blot on the department’s, and City Hall’s, history.

It’s time someone finally was brought to justice for this heinous crime.

Last October, Kelly disclosed that the NYPD would take a new look at the case, in which the sole person accused was acquitted. Since then, The Post’s Philip Messing reports, detectives reviewed hundreds of pages of documents and are tracking down 22 people who were at the scene of the crime.

The incident began with a bogus phone call that an officer had been injured at an address on East 116th Street.

The responding officers were unaware that this was Farrakhan’s mosque. Nor did they know of a secret deal in which cops were forbidden to enter NOI mosques with their guns drawn.

Indeed, the call was made deliberately to provoke a violent confrontation. And it worked.

When the cops rushed the building, they were pummeled by an angry mob. Someone got hold of Cardillo’s gun and shot him with it at point-blank range.

Other cops arrived and isolated 16 suspects in the basement. But when Farrakhan demanded their release and said he could not guarantee the cops’ physical safety, top brass gave in and ordered the officers out – even forbidding them to collect physical evidence.

Moreover, the deputy commissioner at the scene personally apologized to Farrakhan for the police “blunder.” He even praised him publicly for having “exercised great restraint.”

It was a disgraceful capitulation by then-Mayor John Lindsay and his administration to political expediency.

A brave young officer lost his life – and the city’s response doubtless demoralized the rank and file for years to come.

It’s a case that can’t ever be forgotten, as Kelly plainly understands.

Whether there’s a realistic chance that someone finally can be brought to justice for this crime after 35 years doesn’t really matter: The effort must be made – and that’s precisely what appears to be happening.