Friday, the one-year anniversary of the Islamic State’s declaration of its caliphate, was a horrible day across the region. The Islamic State (ISIS, ISIL, Daesh) launched terrorist attacks that have killed innocents in Tunisia, Kuwait, and France. Terrorists seek out soft targets. They search for the unprotected and undefended in order to commit the unexpected. While the U.S. counterterrorism community has perfected defending against the last terrorist attack — hence the obsession with bottled water and more than three ounces of shaving cream at airport checkpoints — large bureaucracies are poor at thinking outside the box. Hence, there will always be another terrorist attack no matter how vigilant police might be.

But what happens when the government that is supposed to secure the flank actually decides to encourage and enable terrorist attacks? No, this is not some Noam Chomsky-esque study in moral equivalence with regard to the United States. Rather, it is apparently the reality of what happened yesterday in Kobani, the Kurdish-held Syrian town alongside the border with Turkey. Islamic State terrorists infiltrated into Kobani from across the Turkish border and massacred almost 150 civilians.

After months of criticism about allowing Turkish territory to be transformed into a figurative highway for foreign Jihadis, the Turkish government promised that it would interdict those seeking to join the Islamic State. Just as Pakistan arrests an occasional foreign fighter and then claims it is serious about combating terrorism and insurgency in Afghanistan, so too did Turkey point to its occasional arrest of a European teenager and say that such action proved it was serious about stemming the flow of recruits into Syria.

The latest Kobani massacre, however, puts that lie to rest. Evidence continues to mount that President Recep Tayyip Erdoğan and the Turkish officials answering to him in the Millî İstihbarat Teşkilatı (MİT), Turkey’s intelligence service allowed Islamic State fighters to traverse through Turkey and attack Kobani from Turkey, a flank the largely Kurdish residents of Kobani felt was secure by nature of it being an international border belonging to a NATO member that had pledged its security. This apparent collaboration between Turkey and the Islamic State increasingly is the rule rather than the exception.

There was, for example, the leak of MİT documents showing Turkish support of Al Qaeda. And, rather than give medals to the Turkish soldiers who intercepted truckloads of weaponry destined for Syrian radicals, Erdoğan ordered their arrest. These are among the topics that the Erdoğan regime has forbidden the Turkish media from reporting.

The problem appears two-fold. First, Erdoğan sympathizes ideologically with the Islamic State. That may sound preposterous; after all, Erdoğan is the elected leader of a NATO member, but evidence regarding his antagonism to the West and a more secular order is overwhelming. And, secondly, Erdoğan is antagonistic to Kurds. The peace process was about politics. Erdoğan derived great benefit both domestically and abroad for appearing sincere in his efforts to end old animosities. This was a cynical ploy, however. Like Atatürk, Erdoğan is perfectly happy to embrace Kurds so long as they abandon their ethnic identity. The only difference between the two is that Atatürk wanted Kurds to subordinate their identity to Turkish nationalism while Erdoğan expected them to subordinate themselves to a common religious identity.

As to evidence of Erdoğan’s antagonism toward the Kurds: There was the unresolved Roboski massacre, as well as overwhelming evidence—including telephone intercepts—showing Turkish security to be behind the assassinations of three Kurdish activists in Paris, France.

More than nine months ago, President Barack Obama promised to “degrade and ultimately destroy” the Islamic State. Despite ordering airstrikes against Islamic State targets, it is unclear whether Obama is committed to doing what it will take to fulfill his pledge. Obama is right, however, that military strategies alone will not lead to victory. There must be a diplomatic component as well.

Diplomacy isn’t simply about talking to one’s partners and adversaries; it is also about achieving goals that cannot or should not be achieved militarily. If the defeat of the Islamic State is a goal — and, given the terrorist attacks of today it must be—then part of a comprehensive diplomatic strategy must be the end of the Erdoğan era. The recent elections — despite the false and naïve optimism of some journalists — were not a “body blow” to Erdoğan but rather a hiccup. If no coalition can be formed, Turkey will head into new elections, ones in which Erdoğan will take no chances.

But how to achieve regime change in Turkey? Direct diplomatic intervention is both unwarranted and unwise. Turks are also nationalist, and so any direct involvement will backfire. But nationalism plays both ways, and many Turks are disgusted about what Erdoğan has done to their country. Indeed, many Turkish political analysts attribute unease over Erdoğan’s Syria policy (and his embrace of radicals) for his party’s disappointing showing in elections earlier this month.

Still, there are tools open to Washington. Back in 2008, the Turkish courts considered banning the ruling Justice and Development Party (AKP) for its constitutional violations. In the end, single justice saved the party—apparently after receiving a large sum of money wired into his bank account by a Turkish businessman who sought to resolve favorably a long-simmering dispute with the AKP. That businessman’s name is whispered among Turks, and Turkish journalists acknowledge the last minute cell phone call that preceded the change of the Turkish judge’s vote. If such information is known, why not make it public? Saving the Turkish president or his ruling party from the exposure of its actions shouldn’t be a goal of the United States. Delegitimizing them in the public sphere is imperative.

Likewise, the AKP has been plagued by corruption scandals allegedly involving Erdoğan, senior advisors, cabinet ministers and parliamentarians. Again, this should be the subject of public discourse, if not in Turkey than from the bully pulpit of the State Department and the White House. If Erdoğan, his children, or ministers and their families, or members of the AKP are believed complicit in corruption or financing terror, they should be sanctioned and banned from the United States. Would such action undercut Turkish participation in the fight against ISIS or in NATO? Perhaps. But, after the massacre in Kobane, it’s time to ask whether the costs of that partnership outweigh the benefits. Regardless, the problem isn’t Turkey but rather its leader and those who blindly do his bidding in the AKP. It may be an uncomfortable conversation, and perhaps many diplomats and analysts will disagree with the policy prescription but it is time to acknowledge one salient reality: There will be no victory over the Islamic State so long as Turkey remains a Trojan Horse betraying those who fight against it.