Several gunshots were fired at the US embassy in Ankara from a vehicle on Monday, amid rising tensions between Turkey and Washington.

An unidentified assailant or assailants fired six bullets at an embassy security gate from a passing white vehicle around 5.30am local time, three bullets hitting an iron door and a window, the Ankara governor's office said in a statement.

The early morning attack coincided with a deepening row between the two countries over the trial of a US pastor in Turkey.

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

The attack on the embassy in the Turkish capital was a clear attempt to "create chaos", the spokesman for President Tayyip Erdogan said on Monday, condemning the early morning drive-by attack.