The outgoing head of the Port Authority is set to receive a retirement benefit reserved for just him and about 50 other execs at the scandal-scarred agency — a double-dip pension, The Post has learned.

Executive Director Pat Foye and administrators of the PA’s PATH system were deemed eligible to collect pensions from both New York and the federal Railroad Retirement Board under a questionable “legal finding” by the authority’s lawyers, sources said.

The PA wouldn’t reveal how many former executives are currently pocketing dual pensions or are in line to get them, or even say when the double-dipping began.

But the situation is under investigation by both PA Inspector General Michael Nestor and state Comptroller Tom DiNapoli, who thinks it’s “troubling” and “possibly illegal,” sources said.

A DiNapoli spokeswoman confirmed that “the matter is currently under review.”

In addition to Foye, those set to receive dual pensions include former Executive Director Tony Shorris, who is now the city’s first deputy mayor under Mayor Bill de Blasio, sources said.

The PA’s former top lawyer Darrell Buchbinder wouldn’t say if he played any role in formulating the “legal finding” that allows the double dipping.

“I think that precedes me, but it doesn’t really matter because I wouldn’t comment on that,” said Buchbinder, who retired in 2015 after 36 years with the PA.

“Also, all that was covered under attorney-client privilege so, again, I have no comment.”

Asked if he was personally pocketing two pensions, Buchbinder, who earned $277,000 a year when he stepped down, said, “I have no comment on the matter.”

Revelation of the double dipping comes as a former PA official, Bill Baroni, awaits sentencing in the New Jersey Bridgegate scandal, and just weeks after The Post exposed PATH workers sleeping on the job while racking up overtime pay.

Tim Hoefer of the Empire Center for Public Policy called the dual pensions a “major problem” that could wind up costing the bistate PA millions.

“You can’t imagine any scenario in which two pensions are being paid to the same individual for the same job that are being backstopped by the public,” Hoefer said.

“It’s not good stewardship of either system to allow an individual to collect pensions from both entities.”

Foye, who earns $290,000 a year, announced his resignation in November 2015, but has remained on well past his planned March 2016 retirement while officials search for his replacement.

A PA spokesman said “participation in the Federal Railroad Retirement System is mandatory” and that Foye “was advised by legal counsel he could not decline the benefit” from the RRB.

Foye plans to “donate the full amounts to charities in New York and New Jersey,” spokesman Neal Buccino said.

In a statement, the Chicago-based RRB — which was recently defrauded in a notorious $1 billion disability scam by former LIRR workers — said PATH “is a covered employer under the Railroad Retirement Act.”

“As such, PATH employees meeting certain eligibility requirements may file for and receive retirement and survivor benefits administered by the Railroad Retirement Board,” spokesman Michael Freeman added.

Additional reporting by Kevin Sheehan and Bruce Golding