Corrupt New York pols who dream of retiring with fat, taxpayer-provided pensions just took a big hit in court.

Score one for justice and common sense.

On Wednesday, a three-judge panel of the 2d US Circuit Court of Appeals ruled that pensions of convicted lawmakers can be seized — even though the state constitution prevents those nest eggs from being “diminished or impaired.”

US Attorney Preet Bharara has been targeting the retirement pay of legislators he’s convicted, rightly calling it a “galling injustice” that crooked pols continue to collect cushy pensions until “their dying day.”

The two corrupt former legislative leaders, Assembly Speaker Sheldon Silver and Senate Majority Leader Dean Skelos, are in line for $80,000 and $96,000, respectively.

But the judges said disgraced former Assemblyman Eric Stevenson must surrender the $22,000 he paid into the system because the state constitution is “pre-empted” by federal law, which allows “forfeiture” of property derived from a crime “irrespective of any provision of State law.”

In 2011, Albany stripped newly elected legislators of their pensions if convicted. But they couldn’t touch those already in office, like Silver and Skelos, because of the state constitution.

This year, after much kicking and screaming, the Legislature OK’d a constitutional amendment to allow the pensions of corrupt veteran pols to be seized retroactively. But it wouldn’t take effect for at least several years. Which makes the 2d Circuit’s ruling all the more important.

Crooked pols have long rested easy knowing they had a taxpayer-funded cushion to fall back on if they got caught. That cushion was just yanked from under them.