ANKARA, Turkey — Secretary of State Rex W. Tillerson showered praise on Turkey’s government on Thursday, despite what some international critics see as a slide toward authoritarianism, and in response he got an earful of grievances from Turkish officials.

Mr. Tillerson’s visit to Ankara, the Turkish capital, was intended to reassure a NATO ally in the fight against the Islamic State and a regional bulwark against a resurgent Iran.

Turkish officials have repeatedly protested United States support for and reliance on Kurdish forces in the fight against Islamic State militants in Iraq and Syria at the same time the Turks are waging a campaign against Kurdish militants inside Turkey.

Mr. Tillerson was vague on Thursday when discussing American support for the Kurds, saying only that there were “difficult choices that have to be made.”