In many ways, New York City taxi medallions were the first form of “congestion pricing” — something worth recognizing as lawmakers look to impose charges for driving into much of Manhattan.

Wisely or not, the city sold exclusive rights to pick up street-hail passengers in order to thin out a herd of cabs whose competition had grown cutthroat (sometimes literally).

The value of that right has plummeted as smartphone technology makes arranging a car service so convenient. Medallions once sold for $1 million; this week, an auction asking $200,000 saw no bids at all.

That’s the life savings of some medallion owners, easily explaining the recent suicides of four city cabbies. Many, many more are suffering.

The industry would love for the city to simply outlaw Uber and other app-based hail services. That won’t happen, nor should taxpayers simply ride to the rescue with a mass bailout.

But, as transportation expert Nicole Gelinas points out, the bargain implied in medallion sales can still be honored in the context of any new congestion pricing scheme — and should be.

And the fact that the tolls would go to help bail out the MTA doesn’t justify ignoring this reality.

Word out of Albany is that an early step in imposing this pricing will be to charge for-hire vehicles to enter Manhattan south of 96th Street: something like $2.75 for Ubers and so on, and $2.50 for yellow cabs.

Medallion holders are outraged, arguing that they’ve already paid. As Gelinas says, they have a point.

Indeed, yellow cabs now pay a 50-cent fee to the MTA on every ride.

There’s still time to fine-tune any toll scheme on this point: Allow yellow cabs, say, 10 free trips a day into the congestion zone in return for the “crude congestion pricing fee” they’ve already paid. (Green cabs might get three, or five.)

The city might have no legal duty to do this, but we’re confident that most New Yorkers will be more than happy to recognize a moral obligation.