In as poetic a bit of justice as you could ask for, City Council members who voted themselves a fat salary hike earlier this year may wind up paying for it with their jobs.

As The Post reported Saturday, at least three members of the state Legislature — Sens. Ruben Diaz Sr. and Bill Perkins and Assemblyman Peter Abbate — are thinking about “retiring” to council jobs.

It’s not just the bump in base pay from $79,500 to $148,500: The switch would also mean no more Albany commute and a chance to do important work in the city. Yes, council jobs are term-limited — but if you’re nearing retirement anyway . . .

God knows the City Council could use more talent — and while we often disagree with all these Democrats, they’re very capable.

Sen. Diaz, a huge fan of charter schools and one of the more independent (and amusing) thinkers in state government, would be a particular jewel in city government.

The council members claimed the pay hike was all about getting better service for city residents. It’s just delicious that they could be proved right — by being replaced.