Azerbaijan's foreign ministry on Thursday announced the expulsion of four employees of Iran's embassy amid growing tensions between Tehran and Baku.
Relations between the countries sharing a border near the Caspian Sea have long been strained.
The ministry said it "summoned" Iran's ambassador and declared that "four employees of the Iranian embassy were declared persona non grata" by Azerbaijan with 48 hours to leave the country.
"During the meeting, strong dissatisfaction was expressed to the Iranian Ambassador due to the recent provocative actions demonstrated by his country," Azerbaijan's foreign ministry said.
Earlier on Thursday Azerbaijan arrested six men it said were linked to Iranian secret services and were plotting a coup.
It said the group was plotting to "set up a 'resistance squad' aimed at establishing a Sharia state in Azerbaijan through armed unrest and violent overthrow of Azerbaijan's constitutional order".
AFP could not independently confirm the allegations that added to escalating tensions between the two countries.
In January, Azerbaijan suspended the operation of its embassy in Iran, days after an attack Baku blamed on Tehran's secret services.
Azerbaijan has criticised Iran over allegedly backing Armenia in Baku's decades-long conflict with Armenia over the breakaway region of Nagorno-Karabakh.
Iran -- which is home to millions of Turkic-speaking ethnic Azerbaijanis -- has long accused Azerbaijan of fomenting separatist sentiment inside its territory.
Tehran also fears that Azerbaijani territory could be used for a possible offensive against Iran by Israel, a major supplier of arms to Baku.