Turkey’s refusal to allow the United States to use its bases to launch attacks against the Islamic State, quarrels over how to manage the battle raging in the Syrian border town of Kobane and the harsh tone of the anti-American rhetoric used by top Turkish officials to denounce U.S. policy have served to illuminate the vast gulf that divides the two nations as they scramble to address the menace posed by the extremists.

Whether the Islamic State even is the chief threat confronting the region is disputed, with Washington and Ankara publicly airing their differences through a fog of sniping, insults and recrimination over who is to blame for the mess the Middle East has become.

At stake is a six-decade-old relationship forged during the Cold War and now endowed with a different but equally vital strategic dimension. Turkey is positioned on the front line of the war against the Islamic State, controlling a 780-mile border with Iraq and Syria. Without Turkey’s cooperation, no U.S. policy to bring stability to the region can succeed, analysts and officials on both sides say.

“If Turkey is not an ally, then we and Turkey are in trouble,” said Francis Ricciardone, who served as the U.S. ambassador to Turkey until the summer. “It is probably the most important ally.”