In a televised speech on Saturday, Iranian President Hassan Rouhani warned the United Arab Emirates against allowing Israel a “foothold” in the Middle East.

“They have committed a huge mistake, a treacherous act,” Rouhani said. “We hope they will realize this and abandon this wrong path.”

“Why then did it happen now? If it weren’t a wrong deal, why was it then announced in a third country, in America? So a gentleman in Washington wins votes, you betray your country, your people, Muslims and the Arab world?”

On Thursday, US President Donald Trump announced that Israel and the Emirates would establish full diplomatic relations in a US-brokered deal, which would see Israel halt its long-standing plans to annex parts of the West Bank.

The UAE will now be the third Arab country, after Egypt in 1979 and Jordan in 1994, to establish diplomatic ties with Israel. It caps several years of growing behind-the-scenes cooperation between Israel and Sunni monarchies of the Gulf to counterbalance Shia Iran as an ambitious regional power broker.

The European Union, Egypt, Bahrain and Oman, have welcomed the agreement, which was strongly condemned by all Palestinian factions.