Azerbaijan authorities have arrested 22 people suspected of plotting to attack the Israeli and American embassies in the capital Baku, AFP reported on Wednesday.

Iran's Revolutionary Guards was reportedly behind the plan to attack Israeli and U.S. targets in the country, according to Azerbaijan's national security ministry.

Open gallery view Waterfront in Baku, Azerbaijan. Credit: AP

A month ago, the national security ministry said it had arrested several activists belonging to the Iranian intelligence service and Hezbollah. The operatives were suspected of planning terrorist attacks against foreigners in Baku.

The state-owned television channel reported that the suspects began gathering intelligence and bought explosives, guns and ammunition.

Two months ago, three men were detained after planning to attack two Israelis employed by a Jewish school in Baku.

The Azeri ministry said at the time that it had arrested a cell that planned to "kill public activists," before it became apparent that the intended victims were two Israeli Chabad emissaries, a rabbi and a teacher employed by the "Chabad Or Avner" Jewish school in Baku.

The government said that the three men, named as Rasim Aliyev, Ali Huseynov and Balaqardash Dadashov, received smuggled arms and equipment from Iranian agents. The action was apparently planned as retaliation to the gunning down of Iranian nuclear scientists.