Bernie Sanders is a real blast from the past.

Not only does the aging pol peddle failed socialist ideas that are better at producing tyranny than prosperity, now he’s recycling the long discredited idea that we are breeding ourselves off the face of the planet.

Even that other New York City newspaper long ago abandoned the cherished leftist belief in “overpopulation,” calling it one of the myths of the 20th century.

Bernie must have skipped the paper that day.

The truth is that birthrates everywhere are falling. Many countries are currently literally dying — filling more coffins than cradles — and many more will soon follow. Even populous China has one foot in the grave, demographically speaking, as its aging population begins dying off.

Demographers tell us that the population of the world will never double again. Our long-term problem — in country after country — is too few children, not too many.

But when the question of overpopulation came up at the recent CNN town hall on climate change, the avowed socialist did not hesitate. Sanders jumped up to pledge that promoting and performing abortions everywhere around the globe with US tax dollars would be a key part of his plan to save the planet from too many people.

What brought Bernie to his feet was the claim by an audience member that “Human population growth has more than doubled in the past 50 years.”

‘Bernie tries to frame this as an issue of “choice,” but population control is about everything but giving women a choice’

This is not true, of course. Population growth rates have been falling for the past half-century, not doubling. While the absolute number of people on Planet Earth did double from 1960 to 2000 from 3 billion to 6 billion, this occurred because of lengthening life spans, not rising birthrates.

In other words, there are more of us around today not because we started breeding like rabbits, but because we stopped dying like flies.

So maybe the questioner was not a math teacher.

But Bernie enthusiastically endorsed her idea that we needed to “curb population growth” and went on to claim that women in poor countries “do not want to have large numbers of babies” but are being denied a “choice” in the matter.

Wrong again, Bernie.

We at the Population Research Institute have actually surveyed women in developing countries like Sierra Leone, Nigeria and Kenya. They say that they are having just about the number of children they want.

What they really want, it turns out, is not fewer children but help in keeping the ones they have alive. On our surveys they list access to clean drinking water, primary health care and help with infectious diseases as their top priorities. Abortion does not even make the list.

Bernie tries to frame this as an issue of “choice,” but population control is about everything but giving women a choice.

Did Chinese women have a “choice” when they were dragged off to abortion clinics under the one-child policy?

Did Indonesian women have a “choice” when soldiers showed up at their homes to escort them in for sterilization?

Did the Quechua-speaking women of Peru have a “choice” when government officials told them that if they wanted medical care for their sick child, they had to agree to a tubal ligation?

Since when has a visit from a government official ever been a good thing?

Population control — which Bernie has now endorsed — is about using the coercive power of the state to deny women the right to decide how many children they have.

Leave it to a socialist to embrace this idea.

Steven W. Mosher is the president of the Population Research Institute and the author of “Bully of Asia: Why China’s Dream is the New Threat to World Order.”