ISTANBUL — Turkish officials assailed the United States on Tuesday for its decision to suspend visas for Turkish citizens, defending their right to detain American Embassy employees they accused of spying and blaming the American ambassador for the diplomatic dispute.

“We did not start this problem,” President Recep Tayyip Erdogan said at a news briefing during a visit to Serbia. “The problem is the United States itself.”

Mr. Erdogan criticized the American ambassador, John R. Bass, for damaging United States-Turkish relations and said he should have resigned or been recalled after making such a unilateral decision. He said Turkish officials would not accept farewell visits from the ambassador, who was already scheduled to leave Turkey within days to become the ambassador to Afghanistan.

“We do not see him as the U.S. representative in Turkey,” Mr. Erdogan said. Turkey has not withdrawn his diplomatic credentials, however.