Smoke rises over the Syrian town of Ras al-Ain, as seen from the Turkish border town in Ceylanpinar, Turkey, on Wednesday. (Burak Kara/Getty Images)

President Trump has defended his shameful abandonment of our Kurdish allies in Syria, declaring that “I was elected on getting out of these ridiculous endless wars” that have left America “bogged down, watching over a quagmire.” Listening to the president, Americans might think that we still have large numbers of U.S. troops fighting on fronts across the Middle East. We do not.

The days when we deployed hundreds of thousands of troops in the Middle East are long gone. Today, we have 14,000 troops in Afghanistan, about 5,000 in Iraq and just 1,000 in Syria. That is a grand total of about 20,000 troops in all three countries. By contrast, we have about 37,950 U.S. troops in Germany, 12,750 in Italy, 53,900 in Japan, and 28,500 in South Korea — a total of over 133,000. In fact, we now have three times more troops deployed in Spain (3,200) than we do in Syria.

Moreover, the vast majority of these U.S. forces are engaged in a noncombat mission known as “train, advise and assist.” U.S. allies do most of the fighting, while American troops provide intelligence, operational planning, fire support and airstrike coordination from behind the front lines. We have helped train and equip about 174,000 Afghan troops, 64,000 Iraqi troops and 60,000 Syrian Democratic Forces (SDF) troops, made up predominantly of Kurdish fighters. They are the ones engaged in ground combat with America’s enemies.

Trump likes to say he “defeated” the Islamic State. Actually, the bulk of the fighting was done by our Kurdish allies, trained and supported by U.S. Special Operations forces. As Gen. Joseph Votel, who served as commander of U.S. forces in the Middle East, explains, “Over four years, the SDF freed tens of thousands of square miles and millions of people from the grip of ISIS. Throughout the fight, it sustained nearly 11,000 casualties. By comparison, six U.S. service members, as well as two civilians, have been killed in the anti-ISIS campaign.”

The Kurds bore the burden of the fight and the brunt of the casualties, and they drove the Islamic State from its physical caliphate. But the terrorists are far from defeated. They still have tens of thousands of fighters and vast financial resources. If we take our boot off their necks, they will come roaring back — just like they did in Iraq on President Barack Obama’s watch.

Who is going to stop them? Since Trump has reduced the U.S. military presence in Syria to just 1,000 troops, that means we are depending on the Kurds to keep the Islamic State down. But if we allow Turkey to wipe out our Kurdish allies, who will be left on the ground in Syria to fight the Islamic State? Answer: No one. Is Trump ready to deploy American ground forces to do the job? His abandonment of the Kurds is a recipe for endless war, not a strategy to end one.

We are also depending on the Kurds to guard about 10,000 captured Islamic State fighters held in prisons in Syria — including 2,000 extremely dangerous foreign fighters. If the Kurds have to divert forces to defend against Turkey, they will be less able to guard those prisons, making it more likely that dangerous terrorists escape. If even one of these terrorists carries out an attack in the West, Trump will own it.

It gets worse. Without U.S. support, the Kurds will have no choice but to turn to Russia, Iran and the regime of Syrian President Bashar al-Assad for protection. As a result, Iran will own all of Syria — giving it a strategic anchor in the Middle East and a base from which to attack Israel. Trump has made containing Iran’s expansion a centerpiece of his Middle East policy. Abandoning the Kurds will empower Iran as never before, increase the danger to Israel and require us to deploy more troops to the region to counter Iranian aggression.

The cry that America is fighting “endless wars” is a canard. Our force levels in Syria, Iraq and Afghanistan are a shadow of their former selves, and U.S. forces are not doing the fighting but rather arming and training allies who are doing the fighting for us. That is the right strategy. But after watching Trump abandon our allies in Syria to be slaughtered, why would anyone step forward to help America in the fight against Islamist radicalism? The president can’t have it both ways. If you don’t want American forces fighting “endless wars,” then you can’t betray your allies.

Read more:

The Post’s View: Trump’s Syria decision reflects his stunning ignorance of the situation

David Ignatius: Trump has opened the door for an Islamic State resurgence in Syria

Ilhan Ahmed: We fought ISIS side by side with the Americans. Now they’re leaving us to our fate.

Hemin Kobane: Turkey wants to destroy us. Trump just gave them a green light.

Josh Rogin: How Trump just destroyed his own Syria strategy