Mr. Obama did not meet Mr. Erdogan in New York, but called him from Air Force One to thank Turkey for taking care of “the massive influx of refugees flowing into Turkey, including tens of thousands this week alone.”

Turkey was initially reluctant to take an openly aggressive stance toward the Islamic State, because the militants had taken 46 Turkish citizens and three Iraqis hostage in Mosul, Iraq. On Sept. 20, Turkey obtained the release of the hostages in a covert intelligence operation. The circumstances of the release were murky — there were reports that Turkey had swapped prisoners for the hostages — but the return of the Turkish captives nevertheless stirred hopes that Turkey would feel less constrained in acting against the group.

Turkey’s most immediate concern, however, is the rise of tensions on its border. The United States and its Arab allies have carried out numerous airstrikes in eastern Syria, but until Saturday there had been no attacks around Kobani, a collection of mostly Kurdish farming villages, also known as Ayn al-Arab. Kurdish fighters had issued urgent calls for help, saying they had only light weapons and were struggling to hold off the extremists, whose fighters are armed with tanks and artillery.

Kurds on both sides of the border were angry that the United States did not do more earlier to protect Kobani, especially since an assault on Kurds from the minority Yazidi religious sect in Sinjar, Iraq, last month triggered the first American airstrikes against the Islamic State. Some Kurds suspected that the United States was ignoring Kobani to mollify Turkey.

A Turkish political analyst said the scenes at the border raised the possibility that Turkey sees the Kurds, and the semiautonomous zone they have carved out around Kobani during three years of civil war in Syria, as “a greater threat” than the Islamic State, which has seized parts of Iraq and Syria, imposing harsh rule in areas under its control.

Those competing priorities, said the analyst, Soli Ozel, a newspaper columnist and a lecturer at Kadir Has University in Istanbul, were likely among the remaining “sticking points” with the United States.