Azerbaijan says it has agreed to resolve a diplomatic crisis with Iran through dialogue, weeks after ties soured over Tehran’s allegations that Israel’s military was active in the country. The breakthrough came during talks between Foreign Minister Jeyhun Bayramov and his Iranian counterpart Hossein Amir-Abdollahian by phone, Azerbaijan’s foreign ministry said on Wednesday. “The sides noted the harmful rhetoric observed recently, which does not correspond to the level of friendly relations between our countries, and the need to resolve all differences through dialogue,” its statement said. “The ministers stressed the importance of always respecting the principles of territorial integrity and sovereignty of the countries.” The Iranian foreign ministry also confirmed the two sides agreed to rely on talks to resolve tensions. Last month, Iran protested against what it said was the presence of its sworn enemy Israel in Azerbaijan and promised to take any necessary action. At the beginning of October, Iran staged military exercises near its border with Azerbaijan, drawing criticism from officials in Baku, who have denied Tehran’s claims. Israel supplies arms to Azerbaijan and the two countries have strengthened their military alliance in recent months. Last year, Israeli-supplied high-tech drones helped Azerbaijan defeat neighbouring Armenia during a six-week war over the disputed Nagorno-Karabakh region. Azerbaijan and Iran have long been at loggerheads over Tehran’s backing of Armenia in the decades-long dispute over the region, which is internationally recognised as part of Azerbaijan, even by Armenia, but is populated and until recently was controlled by ethnic Armenians. Last year’s war ended with a Russian-brokered ceasefire that saw Yerevan return swaths of territories, including a section of Azerbaijan’s 700km (430-mile) border with Iran which for decades had been under Armenian control. Azerbaijan’s recent decision to impose a “road tax” on Iranian trucks passing through areas it regained has also fuelled tensions between Tehran and Baku. Earlier this month, Azerbaijan President Ilham Aliyev said the number of Iranian transit vehicles passing through those roads gradually reached zero after the levies were rolled out. Wednesday’s statement from Azerbaijan’s foreign ministry said the two sides agreed it was “necessary to establish direct dialogue” on transit issues. In talks with Armenia’s Foreign Minister Araray Mirzoyan in Tehran last week, Amir-Abdollahian said the pair agreed to finalise the construction of a transit road that would not pass through Azerbaijani soil. The road is slated to be launched later this year.