ANKARA (Reuters) - Turkish authorities detained two men suspected of shooting at the U.S. Embassy in the capital Ankara on Monday, in an attack that coincides with increased tensions between the two NATO allies over the trial of a U.S. pastor in Turkey.

Nobody was hurt in the attack, which President Tayyip Erdogan’s spokesman condemned as an attempt “to create chaos”. The Turkish Foreign Ministry said it had increased security for the embassy and other U.S. missions and employees in Turkey.

The assailants fired six bullets at an embassy security gate from a passing white vehicle around 0530 a.m. local time (0230 GMT), three bullets hitting an iron door and a window, the Ankara governor’s office said.

It issued another statement on Monday evening saying two men in their late 30s had been detained and a vehicle and pistol seized and that the men had confessed to the shooting.

It said both suspects had criminal records and their links were being investigated.

The embassy is closed this week for a public holiday to mark the Islamic Eid al-Adha festival.

“We can confirm a security incident took place at the U.S. Embassy early this morning. We have no reports of any injuries and we are investigating the details,” said David Gainer, the embassy spokesman. “We thank the Turkish National Police for their rapid response.”

Slideshow ( 3 images )

Video footage from broadcaster Haberturk showed police teams inspecting one of the entrances to the embassy and apparent damage caused by a gunshot could be seen in one window. It said empty cartridges were found at the scene.

“This is a clear attempt to create chaos,” Erdogan’s spokesman Ibrahim Kalin said on Twitter. “Turkey is a safe country and all foreign missions are under the guarantee of the laws.”

The U.S. Embassy in Ankara and the consulate in Istanbul have in the past been the targets of attacks by militants and have faced numerous security threats.

Relations between Turkey and the United States have become increasingly strained in recent weeks, with tit-for-tat tariffs imposed partly due to the trial of a U.S. Christian pastor, Andrew Brunson.

The diplomatic rift has exacerbated Turkey’s economic woes, putting additional pressure on the lira currency, which has lost nearly 40 percent against the dollar since the start of the year.