It’s the pot calling the kettle black. As Saudi Arabia accuses Iran of seeking to encircle it with its support for Houthi rebels in Yemen as well as Qatar, the kingdom and the Islamic republic are extending their bitter rivalry beyond the Middle East into the Caucasus.

The two countries’ latest battleground is oil-rich Azerbaijan, an authoritarian, majority Shia Muslim but secular former Soviet republic on Iran’s northern border with a substantial ethnic population in Iran itself. Recent Saudi overtures came amid reports that Azerbaijan’ s security services had warned the government aboutIran’s growing influence in the country.

The report suggested that an informal lifting in 2013 of a ban on preaching by Islamic scholars linked to Iran that had been quietly imposed in a bid to stem the flow of Azerbaijani Sunni Muslims joining the Islamic State in Syria and Iraq had enabled the Islamic republic to make inroads.

“Iran’s religious activities have become particularly successful,” said Azerbaijani journalist Kenan Rovshanoglu in astudy of religious freedomin the country.

Published by Turan, an independent news agency, the study noted that 22 of Azerbaijan’s 150 madrassas or religious seminaries werecontrolled by Iran.

Iran and Azerbaijan have long tiptoed around each other with both countries concerned that the other could use its religious and/or ethnic affinities to stir trouble. Azeri speakers account for at least a quarter of Iran’s population.

Azerbaijan is, for its part, worried about Iran’s close ties with Armenia. Azerbaijan and Armenia are locked into a decades-long conflict over Nagorno-Karabakh, a disputed Armenian enclave in Azerbaijan.

Iranian concerns about Azeri nationalism were fuelled when supporters of Tractor Sazi FC, a top club in Tabriz, the capital of the Iranian province of East Azerbaijan, that is a symbol of Iranian Azeri identity, chantedAzeri nationalist slogansthree years ago during protests against the government’s environmental policy and alleged anti-Azeri corruption in soccer .

Azar is operated by the National Resistance Organization of Azerbaijan (NROA), a coalition of opposition forces dominated by the Mujahedeen-e-Khalq, a group that enjoys Saudi support but was tainted when it moved its operations in 1986 to Iraq at a time that Iraq was at war with Iran.

The letter said the groups were campaigning for a “study the mother tongue day.” It suggested that the mother tongue referred to was Talysh, a dying northwest Iranian language that is still spoken by at most a million people in the Iranian provinces of Gilan and Ardabil and southern Azerbaijan. The letter implied that the groups General Karimian was concerned included Azeri separatists.

The letter appeared to advocate measures to weaken the separatists by combatting widespread racist attitudes towards Azeris and improving services in East Azerbaijan. Racial attitudes towards Azeris is something Traktor Sazi knows a lot about.

“Wherever Tractor goes, fans of the opposing club chant insulting slogans. They imitate the sound of donkeys, because Azerbaijanis are historically derided as stupid and stubborn. I remember incidents going back to the time that I was a teenager,” said a long-standing observer of Iranian soccer.

Discussing Azerbaijani policy towards Iran, Elkhan Sahinoglu, head of the Center for Applied Politics at Baku’s Western Caspian University, noted that Azerbaijan had no intention of interfering in Iran’s domestic affairs, but could not“disregard the future of the Azeris who reside in Iran.”

Iran’s Islamic Revolution Guards Corp said in November that it had“dismantled a terrorist team”in East Azerbaijan that was “affiliated with global arrogance,” a reference to the United States, and its allies, including Saudi Arabia. The announcement came weeks after Iran said that it had eliminated an armed group in a frontier area of the province of West Azerbaijan that borders on Iraq, Azerbaijan and Turkey and is home to Azeris as well as Kurds.

Columnist Huda al-Husseini highlighted Saudi interest in Azerbaijan in a recent column on Al Arabiya, the television network owned by Middle East Broadcasting (MBC) in whichthe government reportedly obtained a majority shareas a result of Crown Prince Mohammed bin Salman’s recent asset and power purge packaged as a campaign against corruption.

In an article entitled‘Will Iran turn Azerbaijan into another Iraq?’, Ms. Al-Husseini, quoting an anti-Iranian Iraqi author,Raghd Abdel Rida al-Jaberi, asserted that Azerbaijan feared that it would follow in the footsteps of Iraq where Iran allegedly had destroyed the Iraqi military and turned Iraqis into slaves who had been convinced “that washing and rubbing the feet of Iranians who are heading to visit (Imam) Hussain’s tomb brings them closer to heaven no matter what they do afterwards.”

Military delegations from the two countries earlier this month discussed closer military cooperation including holding joint military exercises “as well as a number of other issues of mutual interest,” according toAzerbaijani media.

Azerbaijan has also over the years built close military ties to Israel, which like Saudi Arabia, is staunchly opposed to Iran. Israel and Azerbaijan discussed, prior to the 2015 international agreement that curtailed Iran’s nuclear program,using Azerbaijani airbaseshad it opted for taking out the Islamic republic’s nuclear facilities. The agreement put an end to talk about a military strike.

The bottom line is that if Iran is seeking to encircle Saudi Arabia, Saudi Arabia and Israel are trying to encircle Iran. The mirror image of Saudi Arabia’s belief that Iraq is Iran’s model for Azerbaijan is an Iranian suggestion that Lebanon is Israel’s model.

“Tel Aviv wants to Lebanonize (Azerbaijan) under a ‘new periphery doctrine.’ This means that Tel Aviv intends to create a new periphery region and encircle Iran through its presence in the (Iraqi) Kurdistan Region and Azerbaijan,” saidIranian analyst Salar Seifoddini. Mr. Seifoddini was referring to Israel’s policy of periphery that seeks to forge relations with those bordering on Israel’s enemies.