ISTANBUL — The increasingly strained alliance between Turkey and the United States took a sharp downward turn Sunday when both governments abruptly announced they were canceling most visitor visas between the two countries, sowing confusion among travelers and exposing a widening rift between the NATO partners.

The crisis began when the U.S. Embassy in Ankara, the Turkish capital, announced it was immediately suspending all non-immigrant visa services at diplomatic facilities across Turkey. The move appeared to be retaliatory, coming days after the government of President Recep Tayyip Erdogan arrested an employee of the U.S. Consulate in Istanbul.

An embassy statement said it was limiting visitors to U.S. missions while it “reassesses” Turkey’s commitment to the security of American personnel – an extraordinary rebuke that underscored a deteriorating relationship between the allies. Within hours, the Turkish embassy in Washington released a nearly identical statement announcing its own suspension of non-immigrant visas for Americans.

The tit-for-tat moves illustrated how the critical alliance between Turkey and the United States has been battered recently by a series of deep disagreements over the war in Syria as well the fate of a Turkish cleric, Fethullah Gulen, who is wanted by the Turkish authorities and living in exile in Pennsylvania.