Turkish Prime Minister Recep Tayyip Erdogan is not a man who minces words. He has called Israel a “terrorist state” and has suggested that “Allah would punish” Israel for its inhumane actions in Gaza. Usually, the United States pretends not to hear Erdogan’s rants—but not on Friday, when John Kerry, while visiting Ankara during his first trip abroad as secretary of state, denounced Erdogan for calling Zionism “a crime against humanity.” In response to Erdogan, Kerry said: “We not only disagree with it, we found it objectionable.”On Monday at AIPAC, Vice President Joe Biden praised Kerry for standing up to the Turkish prime minister—and Kerry deserved the props. Kerry’s comment is as critical as State Department language gets regarding a NATO ally—and it’s about time. Policymakers from the Bush and Obama Administrations have sweet-talked and protected Erdogan since his Justice and Development party, known by its Turkish acronym AKP, came to power in 2003. Both White Houses saw Turkey as the model for moderate Islamism, a political current ostensibly willing to embrace democratic norms and project friendly power abroad, including the continuation of its strategic relationship with Israel. They believed Erdogan held the future of U.S. Middle East policy in his hands.But for Erdogan and the AKP that vision has come undone. Domestically, some of his key allies have become powerful and dangerous domestic rivals. Abroad, the uprising in neighboring Syria has shown Ankara’s limits, incapable of shaping even its own immediate sphere of influence. These days, Turkey is looking less like an Anatolian tiger than the mouse that roared. The prospective pillar of Obama’s Middle East policy—the regional power that the White House might have hoped would replace Israel as a strategic ally—is now in meltdown.***It all looked like it was going Turkey’s way just two years ago. Erdogan had positioned himself as a power broker, and Barack Obama considered him one of his closest friends among world leaders. From the White House’s perspective, Erdogan seemed like he had the best possible shot at bridging the distance between Washington and Tehran. The administration hoped he might strike a deal over the Iranian nuclear program that would satisfy both sides. Moreover, the White House believed he would serve as an intermediary between the Americans and the Middle East’s increasingly powerful Sunni Islamist movement, especially the Muslim Brotherhood, in Egypt and elsewhere.All this was made possible by the fact that Erdogan had radically re-oriented Turkey. Ever since Mustafa Kemal Ataturk had founded the Turkish republic in 1923, Turkey had looked westward for inspiration and friendship, distinguishing itself as a key NATO ally and bulwark against Soviet encroachment. But in spite of American entreaties, the EU kept deferring Ankara’s membership throughout the 1990s, justifying Europe’s obvious contempt of Turkey by conditioning EU accession on a healthy human-rights record. (And indeed, today Turkey has more journalists in jail than China does.)Hence Erdogan looked elsewhere, forsaking Europe in favor of that vast and oil-rich region stretching from the Persian Gulf to western North Africa once ruled from Istanbul by Ankara’s storied ancestors the Ottomans. The new watchword was “zero problems with neighbors,” a foreign-policy strategy cooked up by an Islamist intellectual who in 2009 became Erdogan’s foreign minister, Ahmet Davutoglu.In order to show his seriousness, Erdogan played a hand guaranteed to win him the approbation of Muslims and Arabs: the Israel card. In the wake of Operation Cast Lead, Israel’s winter 2008-09 military campaign against Hamas in Gaza, he confronted Israeli President Simon Peres at Davos and told him: “When it comes to killing, you know well how to kill”—and then stormed off the stage. In May 2010, when Israeli commandos boarded a Turkish ship, the Mavi Marmara, to stop it from breaking the naval blockade of Gaza, they were attacked by ship passengers, nine of whom were killed. Erdogan demanded Israel make amends. “As long as Israel does not apologize, does not pay compensation, and does not lift the embargo on Palestine,” he said, “it is not possible for Turkey-Israeli ties to improve.”Obama worked on Turkey’s behalf to secure an apology, in the apparent belief that the burden for fixing a relationship that Erdogan had set out to trash was on Israel. (Israeli Prime Minister Bibi Netanyahu refused to apologize.) The White House also gave the Turkish leader a pass when the AKP and its allies in the Gulenist movement, a cultlike political trend associated with the charismatic preacher Fetullah Gulen, started prosecuting journalists and military officers on charges stemming from the so-called Ergenekon plot. As I wrote in this column in 2010, Ergenekon was largely a political fiction cooked up to intimidate and silence opponents of the AKP and the Gulenists.The White House ignored the obvious signs of Erdogan’s problematic character because the role for which it had cast him was too important. With American troops out of Iraq and scheduled to depart from Afghanistan, and Obama determined to avoid committing more resources to the Middle East, the administration sought a partner capable of keeping the order and doing the work it no longer wanted to do itself. In other words, Obama wanted to switch Israel for Turkey. Jerusalem would remain a U.S. ally, but the heavy lifting and the diplomatic outreach would be done by Ankara, which, unlike Israel, was a Muslim power in a Muslim region and, also unlike Israel, prided itself on its zero problems with its neighbors’ policy.***But the sticking point is that if you live in the Middle East you are always going to have problems with your neighbors. Erdogan found this out the hard way, with the outbreak of the Syrian uprising. The Turkish prime minister considered Bashar al-Assad a “good friend,” but after watching the Syrian president fire on what were then peaceful demonstrators for more than half a year, Erdogan finally called for Assad to step down in November 2011. With refugees flowing across the border, Erdogan tried to enlist the Obama Administration in a more pro-active policy to topple Assad, but he was ignored.Hung out to dry by Obama, Erdogan was left vulnerable to Assad as well as domestic criticism. In June, the Syrians, with Russian help, downed a Turkish jet, and the White House sided with Damascus’ account of the incident, blaming it on Ankara. In October, Syria shelled Turkish villages, and all Erdogan could do was complain.Erdogan’s Syria policy, according to Turkish journalist Tolga Tanis, marks the first time that Turkish public opinion has tilted against the AKP’s foreign policy. “At least 60 percent according to the polls are against Erdogan’s Syria policy,” said Tanis. “The security risk is skyrocketing, and Turks are losing money.”Supporting the anti-Assad rebels has exposed Turkey to retaliation from a longstanding Syrian ally and Turkish enemy, the Kurdish Workers’ party. Also, Turks don’t want a refugee problem on their hands, especially when some of those refugees crossing the Syrian border are Islamist militants. Moreover, with Syria consumed by civil war, Turkey has lost a major trade route to the rest of the region.Then there’s the failure of Erdogan’s once-vaunted soft power. The Obama Administration tasked out much of its Arab Spring diplomacy to its man in Ankara, and in the immediate aftermath of the upheavals that brought down dictators, Erdogan was greeted by throngs in Cairo praising him as the region’s great new leader. But two years on, Muslim Brotherhood parties allied with the AKP, itself a Brotherhood party, have failed to deliver on the promises that brought them to power around the region. Were Erdogan to show his face today in the Egyptian capital, it would likely serve as a target for an unhappy, unemployed shoe-thrower.At home, Erdogan’s AKP is now at odds with the Gulenists, who seem to have taken charge of the Ergenekon trials in order to secure their hold over what Turks call the “deep state,” which includes the judiciary and police. When the army’s former chief of staff Ilker Basbug was arrested last year even Erdogan thought this was going too far. “I think claims that he is a member of a terrorist organization are very ugly,” said Erdogan.Undermined at home and exposed abroad as a weakling—it’s hardly any wonder Erdogan is ranting against Israel again. “It was not improvised, but scripted,” said Tanis. “He was anticipating Kerry’s visit.” The difference between now and Davos in 2009 or the Mavi Marmara in 2010 is that Erdogan is projecting not power but neediness. He wants to know if the White House still loves him and needs him more than Israel. The evidence is not in his favor.***Like this article? Sign up for our Daily Digest to get Tablet Magazine’s new content in your inbox each morning.Lee Smith is the author of The Consequences of Syria.