The $100 million “state-of-the-art’’ security system at JFK airport is just “an expensive piece of junk with no value as a security deterrent,” the head of the union representing Port Authority cops charged today.

In a letter to the PA’s executive director Patrick Foye, Paul Nunziato blasted the agency’s Perimenter Intrusion Detection System as a failed experiment using expensive, but worthless technology.

“On August 11, 2012, the public was let in on the secret we have known for years: PIDS is an expensive piece of junk with no value as a security deterrent,” Nunziato wrote to Foye.

As The Post reported Sunday, a man whose jet ski failed in Jamaica Bay, swam three miles to the airport, then was able to climb an eight-foot security fence and cross two runways. He was not detected until he approached an airline worker for help.

The PIDS project — which uses motion detectors and cameras — was developed by Raytheon, a defense contractor, and is supposed to make JFK impregnable to both trespassers and potential terrorists who approach by water.

It’s long been plagued by delays and cost over-runs.

Just last year, a nude man was able to swim through Jamaica Bay and scale the same fence before making his way undetected to the airport’s jet fuel storage area.

Last weekend’s lapse left Nunziato, president of the Port Authority Police Benevolent Assn., infuriated and demanding answers.

He wrote in his letter, the PA “has spent hundreds of millions of dollars on a system that failed to identify a man wearing a bright yellow life vest who was looking for help . . . Imagine what a team of terrorists, not looking to be found, could do.”

Nunziato took special aim at Jeanne Olivier, the PA’s deputy director of aviation and security, for extolling the PIDS project in speeches before airport executives throughout the country.

Olivier, he asserted, “has given power point presentations . . . touting the PIDS system in what could be a Rayteon marketing briefing.”

A Port Authority spokesman had no immediate comment on Nunziato’s charges.