BAKU, Azerbaijan — Iran has recalled its ambassador from neighboring Azerbaijan, citing a religious insult, in the latest sign of escalating tensions between the countries.

Iranian officials said the envoy, Mohammad B. Bahrami, was summoned to Tehran to discuss recent protests outside the Iranian Embassy in Baku, in which demonstrators were said to have insulted symbols of Islam. Mr. Bahrami left on Monday.

“He was recalled for consultations,” an embassy official, Ahmed Nemati, said in a statement. This month three protests were held outside the embassy. Some demonstrators carried pictures of the Iranian supreme leader, Ayatollah Ali Khamenei, including one that showed him with a bare midriff.

In recent months, relations have grown increasingly tense between Azerbaijan, an oil-rich former Soviet republic on the Caspian Sea, and Iran, its southern neighbor.