Turkish President Recep Tayyip Erdogan on Tuesday branded a U.S. consulate staffer who was arrested by Turkish authorities a spy and said it was Turkey's rights to take steps against "an internal threat," in the latest swipe in an escalating feud with the United States.

Speaking at a news conference in Belgrade, Serbia, Erdogan also accused the U.S. ambassador to Turkey of wrecking ties between the NATO allies by suspending the issuing of visas to Turkish citizens at U.S. diplomatic missions following the arrest of Metin Topuz, a Turkish citizen employed at the U.S. consulate in Istanbul.

The U.S. suspended considering visa applications on Sunday saying it wanted to reassess Turkey's commitment to the safety of U.S. personnel. Turkey retaliated by halting visas services in the U.S.

"How did these spies infiltrate the American consulate? If they didn't infiltrate the American consulate, who put them there?" Erdogan said, speaking alongside the Serbian president. "No state would allow such spies that pose an internal threat." He was referring to Topuz as well as a second consulate employee whom Turkish authorities say they want to question.

Turkish authorities accuse Topuz of espionage and alleged ties to U.S.-based cleric Fethullah Gulen's movement, which Turkey says was behind last year's failed coup.

Earlier, Turkish Prime Minister Binali Yildirim said Turkey did not need Washington's permission to prosecute its citizens and slammed the U.S. for the arrest of a Turkish banker for his alleged role in helping Iran escape U.S. sanctions, and for its failure to extradite Gulen.

U.S. Ambassador John Bass said in a video message released late Monday that Turkish authorities had failed to show any evidence against Topuz and that he had insufficient access to a lawyer. He also said the arrest "raised questions whether the goal of some officials is to disrupt the long-standing cooperation between Turkey and the U.S."

Ties between the two NATO allies were already strained over Gulen's presence in the United States and Washington's support for Syrian Kurdish militia, whom Turkey considers to be terrorists because of their links to Kurdish militants fighting Turkey. Separate indictments in the U.S. against Erdogan's bodyguards who were embroiled in violence and against the banker and a former Turkish economy minister accused of conspiring to violate U.S. sanctions had deepened the rift.

State-run Anadolu Agency said Topuz had allegedly communicated with former police chiefs in a 2013 corruption probe — which the government claims was instigated by Gulen's supporters — and with other officers allegedly involved in the attempted coup. Gulen denies involvement in the coup attempt.

Bass said it was part of Topuz's duty to be in contact with police officers.