The city’s police-officers union is cracking down on the number of “get out of jail free” courtesy cards distributed to cops to give to family and friends.

Patrolmen’s Benevolent Association boss Pat Lynch slashed the maximum number of cards that could be issued to current cops from 30 to 20, and to retirees from 20 to 10, sources told The Post.

The cards are often used to wiggle out of minor trouble such as speeding tickets, the theory being that presenting one suggests you know someone in the NYPD.

The rank and file is livid.

“They are treating active members like s–t, and retired members even worse than s–t,” griped an NYPD cop who retired on disability. “All the cops I spoke to were . . . very disappointed they couldn’t hand them out as Christmas gifts.”

A source said Lynch ordered the cutback to stop the sale of the cards, which were being hawked on eBay last week for as much as $200.

The PBA and the NYPD declined comment.