Tensions between Azerbaijan and Iran have reached a boiling point in recent weeks. There are three main reasons behind the strained relationship, including perceptions that Azerbaijan has been strengthening ties with Israel amid the ongoing Iran-Israel conflict . Azerbaijan also launched a joint military exercise with Pakistan and Turkey — a country competing with Iran in Middle East leadership — on September 1. Additionally, in mid-September, Azerbaijan imposed a road tax on Iranian trucks traveling through Azerbaijani territories.
Iran and Azerbaijan are divided by a 700-kilometer border. Parts of this territory and the entry roads were long under Armenia's control, following the first Karabakh war that ended with the 1994 ceasefire . In 2020, after the 44-day second Nagorno-Karabakh war  between Armenia and Azerbaijan, Azerbaijan regained control over large swathes of this territory, including entry roads and land on the Iranian border.
Azerbaijan also resented perceptions that Tehran  backed Armenia during the recent conflict. Despite this, the relations were somewhat normal until Azerbaijan decided in September 2021 to impose road tax on Iranian trucks using roadways that are now under the control of Azerbaijan. When Armenia controlled those roads, vehicles could pass freely without having to pay any tax.
Two Iranian truck drivers were arrested on September 15, 2021, further escalating tensions. Baku officials said  the two are still being detained and have been charged with smuggling and illegally crossing the Azerbaijani state border.
Northern Iran is populated by ethnic Azerbaijanis who make up the largest non-Persian minority in Iran. During the war last year, ethnic Azerbaijanis organized protests  in support of the war in several cities in Iran. “Iran has traditionally stayed neutral  in the conflict between Armenia and Azerbaijan. But as tensions have risen, the narrative in Azerbaijan has shifted toward portraying Iran as purely and actively pro-Armenian,” wrote  journalist Joshua Kuchera in his overview of tensions on October 12. Not all agree with this view, though, as political analyst Eldar Mamedov: explained  in an interview with Eurasianet, “Iran has repeatedly supported Azerbaijan's territorial integrity on the level of political and religious leadership.”
Iran repeated its support for Azerbaijan during the 44-day war when President Hassan Rohani's chief of staff Mahmud Vaezi told  Azerbaijani Deputy Prime Minister Shahin Mustafayev that, “The stance of the Islamic republic on Azerbaijan has always been clear and transparent as it has always recognized the neighboring country's territorial integrity and respected it.”
Others, like Touraj Atabaki, professor emeritus of the social history of the Middle East and Central Asia at Leiden University in the Netherlands, believe Iran is concerned about being politically sidelined . In an interview  with Radio Liberty, Atabaki said, “Turkey has the second-largest NATO army, and Pakistan is a nuclear power in the region. When these two countries join Azerbaijan in military maneuvers, it worries Russia and Iran — and the Islamic republic's military maneuver [reflects] its concern.”
In addition, Iran views Azerbaijan as Israel's proxy, explained  Abbas Qaidari, a researcher on international security and defense policy. Israel and Azerbaijan share a military alliance, and Azerbaijan has received Israeli military  and surveillance  equipment. “That relationship has been strong for years, although it has been newly visible since last year's war, in which Azerbaijan used Israeli weaponry to significant effect,” wrote  journalist Joshua Kuchera on September 30.
Timeline of the tensions
To understand a rapidly changing situation, here is a timeline of the most recent events:
August 26 — Azerbaijan blocked  the Goris-Kapan road, Armenia's only highway to Iran, for nearly 48 hours. Goris and Kapan are the two main towns of southern Armenia. In addition to connecting these two towns, the road includes a 21 kilometer-long segment that passes through Azerbaijan's newly regained territory.
The Foreign Ministry of Azerbaijan summoned  Iran's ambassador to Baku to share a diplomatic note expressing  Azerbaijan's dissatisfaction with Iranian trucks illegally entering parts of Karabakh now controlled by Azerbaijan.
September 12 — Azerbaijan launched a joint military exercise with Turkey and Pakistan.
Azerbaijan's Defense Ministry asked the Russian Defense Ministry that Russian peacekeeping forces stationed in Karabakh prevent “illegal crossing of third-country vehicles into the territories of Azerbaijan.”
September 13 — Azerbaijan confirmed it set up checkpoints and was collecting customs payments at the Goris-Kapan road.
September 23 — Azerbaijan's Foreign Minister Jeyhun Bayramov met with his Iranian counterpart Hossein Amir-Abdollahian on the sidelines of the United Nations General Assembly.
September 27 — President Ilham Aliyev said in an interview with the Turkish Anadolu Agency that Iranian trucks were using that route “illegally” prior to the second Karabakh war.
He also criticized  the Iranian military exercises, saying to Turkey's Anadolu Agency: “Every country can carry out any military drill on its own territory. It's their sovereign right. But why now, and why on our border?”
September 30 — Iran's Foreign Minister, Hossein Amir-Abdollahian, at a meeting with Azerbaijan's new ambassador to Tehran, said Iran wouldn't “tolerate the presence and activity” of Israel against the country's national security and the country will take actions if such need arises.
The country also announced it would hold large-scale military exercises near the Azerbaijani border, following another set of drills in the same region reported  Eurasianet.
October 1 — Tehran launched military drills near its northwestern border with Azerbaijan.
October 3 — Iran's supreme leader, Ayatollah Ali Khamenei, tweeted  in Azerbaijani, “those who dig pits for their brothers will fall into those pits themselves.”
In response, Azerbaijan held another joint drill with Turkey, this time in its Nakhchivan enclave on October 5.
3'üncü Ordu Komutanlığımız ile Azerbaycan Nahçıvan Ordu Komutanlığı unsurlarının katılımıyla Nahçıvan’da gerçekleşecek olan Sarsılmaz Kardeşlik-2021 Tatbikatı’nın provaları başarıyla icra edildi. pic.twitter.com/N0q1OTF5dm 
— T.C. Millî Savunma Bakanlığı (@tcsavunma) October 5, 2021 
The rehearsals of the Unwavering Brotherhood-2021 exercise, which will be held in Nakhchivan with the participation of our 3rd Army Command and Azerbaijan Nakhchivan Army Command, were carried out successfully.
October 4 — Azerbaijan's Foreign Ministry dismissed  Iran's claims of a third-party presence, calling them baseless.
October 5 — President Ilham Aliyev dismissed Tehran's allegation of an unofficial Israeli presence in the country. “Let them open their eyes and look. Where do they see Israel here? Not a single person lives here. There is not a single building here. Is there proof? No,” Aliyev told  reporters speaking to them from Jabrail, just a few miles from the border with Iran. The president asserted that baseless allegations wouldn't go unanswered.
The same day, Azerbaijani media reported that Iran cut off its airspace to Azerbaijani military flights, while Azerbaijani authorities shut down  a mosque and an office of Seyyed Ali Akbar Ojaghnejad, a representative of Supreme Leader Ayatollah Ali Khamenei, citing a spike in COVID infections  at the mosque.
October 6 — Iran's Foreign Minister, Hossein Amir-Abdollahian, said Tehran was “deeply concerned by Israel's presence in the Caucasus.”
October 13 — Questions over what triggered the tensions remain. However, both Iran and Azerbaijan expressed  interest in resolving the current diplomatic crisis through dialogue on October 13. Following a phone call with his counterpart Hossein Amir-Abdollahian, Azerbaijani Foreign Minister Jeyhun Bayramov, the two officials announced the de-escalation effort .