TEHRAN, Iran: A gunman this week stormed the Azerbaijan Embassy in the Iranian capital, Tehran, and killed its security chief and wounded two guards.
The attack raised long-standing tensions between the neighboring countries.
Azerbaijan's Foreign Ministry has since accused Tehran of ignoring reported threats to its embassy, including inciting comments in hard-line media over Azerbaijan's diplomatic ties to Israel, adding that following the attack it would evacuate the diplomatic post.
Tehran's police chief, General Hossein Rahimi, initially re-affirmed reports by Iranian state media and blamed the attack on the gunman's "personal and family problems."
However, after footage emerged that appeared to show a security force member doing nothing to stop the attack, it was reported that Rahimi would lose his position as police chief.
In a statement, the Azerbaijan Foreign Ministry said, "Previously, there have been attempts to threaten our diplomatic mission in Iran, and it was constantly raised before Iran to take measures to prevent such cases, and to ensure the safety of our diplomatic missions."
"Unfortunately, the last bloody terror attack demonstrates the serious consequences of not showing proper sensitivity to our urgent appeals in this direction. We are of the opinion that the recent anti-Azerbaijani campaign against our country in Iran led to such attack against our diplomatic mission," the ministry added.
Also, Azerbaijan President Ilham Aliyev called the assault a "terrorist attack."
"We demand that this terrorist act be swiftly investigated and the terrorists punished. Terror against diplomatic missions is unacceptable!" he said in a statement.
The Iranian judiciary's Mizan news agency quoted prosecutor Mohammad Shahriari as saying that the gunman's wife had disappeared in April after visiting the embassy, and he believed his wife was still in the diplomatic post at the time of the attack, even though it was some eight months later.
Meanwhile, Iranian Foreign Ministry spokesman Nasser Kanaani said Iran strongly condemned the attack, which is being investigated with "high priority and sensitivity."
Azerbaijan has summoned Iran's ambassador to lodge a protest over the attack. Azerbaijan's ally, Turkey, also condemned the attack and called for justice to be met and measures to be put in place to prevent similar attacks in the future.
US State Department spokesperson Ned Price said the US condemns the attack. "We echo President Aliyev's call for a prompt investigation into this unacceptable violence," he said.