Ecuador’s foreign ministry said in a statement that an agent of the US Immigration and Customs Enforcement agency (ICE) had “tried to enter the premises of the consulate” at 11:00 local time (17:00 GMT) on Tuesday.

Under the 1963 Vienna Convention on Consular Relations, external, consular premises are considered “inviolable”.

According to the Convention, the authorities of the country where the consulate is located “shall not enter” the parts of the consulate used for work “except with the consent of the head of the consular post”.

Ecuador said that its officials had not consented to ICE entering the consulate.

While the Vienna Convention goes on to say that consent may be assumed in certain cases, they are limited to incidents where “prompt protective action” is required, such as in the case of a fire or some other disaster.

In a video shared by Ecuadorean media, which has not been independently verified by the BBC, a consular official can be seen rushing to the entrance door and telling an ICE agent “this is the consulate, you’re not allowed in here”.

The agent tells the official that “if you touch me, I will grab you”.

The consular official then states again that “you can not enter here, this is a consulate, this is a foreign government’s office”, before closing the door.

In its statement, Ecuador’s foreign ministry said that it had “immediately” handed a an official letter of protest to the US embassy in Quito.

The protest letter constitutes a rare note of discord between Ecuadorean President Daniel Noboa and the Trump administration.

Just over two months ago, the two presidents agreed to strengthen their countries’ commercial and economic relationship and Noboa has in the past thanked Trump for designating two Ecuadorean criminal gangs as Foreign Terrorist Organisations.