Turkey's President Recep Tayyip Erdogan addresses his supporters, outside Istanbul on Sunday. Erdogan called on Greece to open its borders and allow the migrants to move on to other European countries. Credit: Courtesy of the Presidential Press Service via AP

Turkey has opened the floodgates, and soon Europe will be drowning in immigrants. “Hundreds of thousands have crossed,” Turkish President Recep Tayyip Erdogan claimed on television, “and soon it will reach millions.” And it must be true, because you can see it live on your medium of choice.

Look at this clip of Greek frontier guards firing tear gas canisters into angry, stone-throwing crowds of refugees who are right up against the border fence. Look at this shot of other Greek paramilitary troops shooting into the water right beside a rubber raft filled with refugees. Millions and millions of refugees. The migrant Armageddon is at hand.

It’s ugly, but it’s not really what it seems. Erdogan said he has opened Turkey’s border with the west because the country has already taken in 3.6 million refugees, mostly from Syria. There’s just no room for the several million more now trying to get out of Idlib, the last Syrian province held by jihadi rebels. So he’s sending them west.

That is, at best, an oversimplification. There are no more Syrian refugees coming into Turkey from Idlib, because Turkey has closed the border against them. Indeed, most of the people now trying to storm the borders of Greece and Bulgaria — 13,000 at last count, not “hundreds of thousands” — are not Syrians at all.

They are Afghans, Eritreans, Iraqis, West Africans, some genuine refugees and others “economic migrants,” who are already living safely in Turkey, but would rather be in some country in the European Union.

They didn’t walk more than 370 miles from Idlib, either. The Turkish government is busing them to Greece’s land and sea frontiers from wherever they have been living in Turkey, telling them (falsely) that the Europeans will let them in. Erdogan just wants to put pressure on the EU.

Pressure to do what? Good question. He may not know himself, but he’s desperate because his bluff in Syria has been called and he’s facing a potential military confrontation with Russia. It’s not clear how putting the Europeans into play will change that, but he’s definitely at the “Do something! Anything!” stage of desperation.

Erdogan’s problem is that for the past three months the Syrian army, with strong Russian air support, has been taking Idlib province back from Turkey’s Syrian jihadi allies, Hayat Tahrir al-Sham (formerly an al-Qaeda franchise), in a slow, grinding offensive.

Turkey has troops in Idlib, and has gradually been committing them to combat to help the jihadis, but still the Syrian-Russian advance continues. Erdogan has threatened to go to full-scale war, and the Syrian regime and the Russians haven’t even blinked. More than 50 Turkish soldiers have already been killed, so what does he do now?

I don’t know, and I suspect he doesn’t know either. The whole refugee thing may just be a displacement activity, not part of a cunning plan. We’ll probably know more in a week’s time — but in the meantime, look at those clips again, because that’s what the future, or at least a big part of it, will look like.

This is the first time that we have documented evidence of European border guards shooting at, or at least very near, illegal migrants. Yes, there are special circumstances, the migrants are being sent as part of a political ploy — but it will not be the last time.

All of the Middle East and West Africa is going to be hit early and very hard by climate change, which will cause a steady fall in food production. The rule of thumb is that you lose 10 percent of food production for every rise in average temperature of 1 degree Celsius.

To make matters worse, these regions also have the highest population growth rates in the world: doubling times for most countries are 25 years or less. Now it’s poverty and war that drives the migrants; in the future it will be actual hunger — and war, of course.

Europe’s external borders are already closing down, but in years to come the dirty little secret that everybody refuses to acknowledge will finally become public knowledge. It’s quite easy to shut borders, really. You just have to be willing to kill people who try to cross them without permission.

Gwynne Dyer’s new book is “Growing Pains: The Future of Democracy (and Work).”