Turkey under Erdogan has long ceased to behave like a NATO ally.

​Over the weekend, the killing began in earnest.

Turkey used its U.S.-supplied fighter jets to bomb more than one hundred targets in the predominantly Kurdish province of Afrin in Northern Syria on Saturday, killing civilians and YPG fighters alike.

On Sunday, Turkish ground troops crossed the border, invading Syria.

Turkish President Recep Tayyip Erdogan has made his intentions abundantly clear, vowing repeatedly to crush the Kurdish-led democratic government in Afrin, on Turkey’s southern border.

But it was Erdogan’s threats last week to U.S. troops serving as advisors to Kurdish fighters in northern Syria that were the real show stopper.

“This is what we have to say to all our allies: don’t get in between us and terrorist organizations, or we will not be responsible for the unwanted consequences,” Erdogan said in a speech in Ankara.

“Either you take off your flags on those terrorist organizations, or we will have to hand those flags over to you, Don’t force us to bury in the ground those who are with terrorists,” he said.

In other words, Get out of the way, or you die.

Erdogan was ostensibly responding to a statement from a U.S. military spokesman a few days earlier, who revealed that the U.S. was working with the Kurdish-led Syrian Democratic Forces (SDF) “to establish and train the new Syrian Border Security Force.”

The inaugural class of the new border security force, currently in training, was just 230 persons. But the goal was “a final force size of approximately 30,000,” the spokesman said.

When he heard that, Erdogan went ballistic, absolutely insane.

He declared that Turkey would “strangle” the border force “before it is even born,” and kill any American found working with the Syrian Kurds, who just by the way have never carried out a terrorist attack in Turkey, have never ventured into Turkey, and have established a free, self-governing enclave in northern Syria that puts the Iraqi Kurdish Regional Government to shame for its inclusiveness and transparency.

So, of course the United States government immediately put Erdogan on notice that he was out of line. Right? Because the U.S. has a strategic interest in seeing a free, democratic, secular enclave flourish in northern Syria.

Secreatary of State Rex Tillerson rushed up to Vancouver, Canada, to meet with Turkish Foreign Minister Mevlut Cavosoglu on Tuesday. When he returned to Washington the next day, he ate his hat.

The “entire situation” in Syria “has been misportrayed, misdescribed,” Tillerson said. “Some people misspoke. We are not creating a border security force at all,” he added.

So much for American credibility.

The Pentagon next tried to walk back its own statements. Spokesman Eric Pahon explained that the new “security forces” the U.S. was training were not a new army or a conventional border guard force. They were merely “internally-focused to prevent ISIS fighters from fleeing Syria.”

Small wonder that the back-peddling and hat-eating weren’t enough to appease Erdogan, a dictator who knows a lack of resolve when he smells it.

I had the opportunity this past summer in northern Iraq to meet Asiya Abdallah Osman, the co-president of the Democratic Union Party, the PYD, part of the governing coalition in the Kurdish enclave in northern Syria.

“We are an independent political party that belongs to Syria and to the Kurds,” she told me. “We have a project for all of Syria, and we want American help – not just militarily, but politically.

“We see the fight against ISIS as strategic. But after the ISIS war, help us to achieve a democratic, federal Syria.” I published more from that interview in these pages, here.

The civil administration in Syrian Kurdistan – Rojava – is not perfect. But it has attempted a monumental task of not only including representatives from all ethnic and religious communities, but of bringing the modern world into a predominantly tribal society. And it has been a haven of stability in the killing fields of the Syrian civil war.

“We have been working on the women from all communities, not just the Kurds,” a prominent Kurdish women’s activist, Nilufer Koc, told me recently in Brussels.

Ms. Koc, who also co-chairs the Kurdish National Congress, has spent much of the past five years in Rojava working on women’s issues. “One sheikh [Muslim religious leader] told us, Daesh [ISIS] was better than you,” she told me. “At least they didn’t try to change our way of life. What he meant was, they don’t try to get us to change the way we treat our women. But that’s exactly what we have to help them change.”

Kurds from Iran, Turkey, Iraq and Syria all look to Rojava as the “success story” of Kurdistan, and that is precisely why the Turkish government wants to break its back.

Many Kurdish leaders from Iran and Syria see the Kurdish Regional Government in northern Iraq as a failure, brought down low by the monumental corruption of the ruling Barzani clan. “There are people in the KRG government who now have billions of dollars in overseas bank accounts,” one Kurdish activist told me recently at an international conference in Brussels. “They haven’t earned this money because they are developers, or financial geniuses. They have stolen it from the Kurdish people.”

The PYD in Syria, just as PJAK in Iran, both draw their inspiration from the ideology of PKK founder, Abdallah Ocalan, who has been in a Turkish prison for the past 18 years. Both of them seek to form governments that are broad-based, democratic, secular, and that grant equal rights to women.

“We don’t want one any one group to dictate a vision, including ourselves,” PJAK co-chairman Siamond Moieni tells me. “We don’t want a communist or a socialist system, but a democratic system, such as you see in Rojava.”

While I was in Suleymania, Iraq, last summer, I met with Serhat Wartu, a Central Committee member of the PKK. Mr. Wartu openly asked for U.S. support.

“Your ‘ally,’ Turkey, is fighting you,” he said. “We have more in common with you than Turkey does. Turkey was a U.S. ally during the Cold War. But today, Turkey is opposing the United States on many fronts. For example, Turkey makes it hard for the U.S. to fight Iran. If the U.S. wanted to fight Iran, the U.S. would first have to make changes in Turkey.”

Turkey, Iran, and Syria claim that the PKK is the Wizard of Oz of Kurdistan, and somehow controls PJAK in Iran, and the YPD in Syria. While both groups express an admiration for the philosophy of PKK leader Abdallah Ocalan – most notably, his insistence on secularism and the equal treatment of women – each group separately elects `its own leaders and determines its own policies.

As Wartu put it, “We are not one party. We do have a consensus and a common understanding and a common front. You can see that when people adopt Ocalan’s ideas. But PJAK is not the PKK. YPG is not the PKK. We are the ideological base, not the command center.”

I have written about the differences among these Kurdish parties here, here, here. On several occasions I have visited their training camps in the Qandil mountains in northern Iraq, and interviewed their leaders.

What remains abundantly clear is that Erdogan views any successful Kurdish entity as a threat, and he will intervene militarily, whenever he thinks necessary, to crush it.

Here is where U.S. and Turkish interests collide.

Does the United States believe that its engagement alongside Kurdish fighters in northern Syria is in our national security interest, not just in the fight against ISIS, but in the broader war against jihadi Islam in the Middle East and beyond?

If so, we should be telling Erdogan to go home, with a big “or else” behind it.

If not, well, we may as well abandon the fight, because the Kurds in Afrin are on the front lines of the battle President Trump has declared to be the generational struggle his administration has engaged to eradicate Islamic terrorism, with Turkey’s Erdogan clearly on the other side, aiding and abetting ISIS.

This is it, folks. Are we serious about defeating jihadi Islam? Or is it just words?

The proof of the pudding will be found in Afrin.