This week Turkish prime minister Recep Tayyip Erdogan will meet with President Obama in the Oval Office. The meeting takes place a few days after the worst terror attack in Turkey’s history, which on May 11 left at least fifty people dead in a town close to the Syrian border. Turkey is deeply involved in the attempt to bring about regime change in Syria, providing crucial sanctuary for and logistical support to the Sunni rebels, and has exposed itself to threats to its own security.

On the face of it, the relationship between the president and the prime minister is warm. Obama has said that Erdogan is one of five world leaders with whom he enjoys the most effective relations. Obama told Time’s Fareed Zakaria in an interview in 2012 that he has been able to forge “close working relationships” with German chancellor Angela Merkel, Indian prime minister Manmohan Singh, South Korean president Lee Myung-bak, British prime minister David Cameron and Erdogan, and “gotten a whole bunch of stuff done.” Obama has relied heavily on Turkey in seeking to oust Syrian president Bashar al-Assad. American and Turkish officials have been cooperating closely, and Secretary of State John Kerry has traveled to Turkey three times since taking office.

Yet the Obama-Erdogan partnership over Syria has not yielded any of the results that Washington had hoped. Obama and Erdogan have not “gotten a whole bunch of stuff done.” Turkey has not assisted the United States in its so far unsuccessful endeavor to lay the foundation for a political transition to a moderate post-Assad Syria, where the influence of Islamists would be circumscribed. Turkey has remained steadfast in its support to the Muslim Brotherhood, which dominates the umbrella organization of the Syrian opposition. Yet even more worryingly, Ankara has allowed militant Islamist groups, notably Jabhat al-Nusra, whose commander has pledged allegiance to Al Qaeda’s leader Ayman al-Zawahiri, to use its territory as a rear base and to freely cross back and forth over the Turkish-Syrian border.

Obama worries that arming the rebels will have unintended consequences, but Erdogan has not demonstrated that he shares those concerns. The New Yorker recently reported that the president is particularly concerned about genocide against the Alawites. Erdogan however, is cavalier about what arming the Sunni rebels might lead to. Erdogan has said that he wants the United States “to assume more responsibilities and take further steps,” that is, arming the rebels and establishing no fly zones to help the Sunni rebels advance to oust Assad. Turkish foreign minister Ahmet Davutoglu downplayed the Islamist threat in a recent interview, insisting that the existence of the Islamist militants should not serve as an excuse for passivity.

In contrast, Jordan’s King Abdullah reportedly warned President Obama about the rise of the Muslim Brotherhood and the Salafists in Syria, and he has stated that “I am not willing to transform the Jordanian border into a platform for launching a war against Syria, as the situation is on the Turkish-Syrian border.”

And while the Obama administration has belatedly begun to explore a diplomatic path to negotiate an end to Syria’s civil war, with Secretary of State John Kerry reaching an agreement last week with Russian foreign minister Sergey Lavrov about convening a conference in Geneva by the end of this month, Erdogan has not given any indication that he is prepared to contribute to a political settlement. On the contrary, Erdogan is increasingly using an inflammatory rhetoric, replete with religious exhortations. In a speech on May 5, Erdogan blasted Assad, following reports that Sunnis had been massacred in the town of Banias. The Turkish prime minister invoked the punishment of God, and expressed the hope that “blessed revenge” will fall upon Assad in this life. Addressing his religious brethren in Syria, he predicted that the “help of God is surely near.”

Yet, the reaction of the Turkish leadership to the worst terror attack Turkey has witnessed has been conspicuously muted, with President Abdullah Gül underlining the importance of not being “provoked.” Turkey’s entanglement in Syria has exposed that Ankara’s pretentions to be the “master” of the Middle East—in the words of Foreign Minister Davutoglu—are not matched by a corresponding capability to wield hard power. The notion of Turkish boots on the ground in Syria remains unthinkable for the Turkish leadership.

But it is not only Turkey’s weakness that has been exposed; more worrisome from an American point of view are the implications of Turkey’s refusal to recognize the seriousness of the Islamist threat in Syria. The “close working relationship” that President Obama has forged with Prime Minister Erdogan can reasonably not be maintained at such a level if the Turkish leader persists in not being sensitive to Obama's concerns.

By now, it should be obvious for President Obama that the notion of advancing Western values, pluralism and tolerance in Syria in partnership with Turkey—if possible at all—is illusory. Even if Obama were to secure a commitment from Erdogan to check Islamist groups like Jabhat al-Nusra, Turkey has demonstrated that is not ideologically inclined to promote anything but a Muslim Brotherhood takeover, which would not help advance pluralism. Obama can nonetheless contain the damage caused by Turkey’s adoption of the Sunni cause, by helping to save Erdogan from himself.

In a recently published report, the Brussels-based International Crisis Group exhorts Turkey to change course, in order to avoid being destabilized: “Turkey must stop betting its reputation on a quick resolution of the Syria crisis, give full support for a negotiated solution, and take steps to avoid any perception in the region that it is seeking to act as a partisan, Sunni Muslim hegemon.” The International Crisis Group advises Turkey to “minimize border crossings by Syrian opposition fighters” and states that the rebels should not be allowed to use Turkish refugee camps as rear bases.

But for that to happen, President Obama will need to unequivocally convey the message to Erdogan that arming rebels is off the table. If Erdogan were to return from Washington with a clear understanding that Obama is not going to take any “further steps” that escalate the conflict, he will stop hoping for an American involvement that rescues his cause in Syria, and realize that he needs to change course. Erdogan will have no choice but to heed the advice to close the border to the Islamist rebels, in the interest of avoiding further destabilization of Turkey.

Turkey may subsequently even be induced to make a constructive contribution to the solution of the Syrian conflict, by encouraging its protégées, the Muslim Brotherhood, to join the efforts to find a negotiated solution. But the question how much Erdogan can be trusted as a Western ally, after he has demonstrated that he does not share American concerns about allowing Islamic radicals free rein, will still linger and cast a shadow over the American-Turkish relationship.

Halil Karaveli is a senior fellow at the Central Asia-Caucasus Institute and Silk Road Studies Program, which are affiliated with the School of Advanced International Studies at Johns Hopkins University, in Washington D.C., and with the Institute for Security and Development Policy, in Stockholm. He is also the managing editor of the Turkey Analyst.