Azerbaijan has completely suspended the activities of its embassy in Tehran and evacuated 53 persons.
"We have completely suspended the diplomatic activities of the embassy," Deputy Foreign Minister Xalaf Xalafov told reporters on 29 January.
"There are certain speculations that it has not suspended its activities. But it has completely suspended. Five people are remaining there for the protection of the administrative building and property of the embassy, those who remain in the embassy will not carry out diplomatic activities," Xalafov elaborated.
“We do not trust Iran regarding the security of our embassy staff,” he added.
"The termination of diplomatic activity in any country is a responsible decision. But we do not have confidence in Iran regarding the safety of our embassy staff. We have brought this to Iran’s attention," Xalaf Xalafov said, Azernews reports.
A gunman stormed the Azerbaijan Embassy in Iran's capital Friday, January 27 and killed its head of security.
The shooter, armed with a Kalashnikov assault rifle, also wounded two guards in the attack.
Police in Tehran said a suspect was arrested.
Tehran's police chief, General Hossein Rahimi, said the suspect was an Iranian man who believed his Azerbaijani wife was being held at the embassy.
Iranian Foreign Minister Hossein Amirabdollahian said the gunman's motive was personal.
He told Azeri Foreign Minister Jeyhun Bayramov in a phone call that he hoped the attack would not damage bilateral ties, according to Reuters.
Early reports in Iranian media said the attacker entered the embassy with two small children. However, surveillance video released in Azerbaijan, purportedly of the attack, showed the gunman entering the building alone.
It also appeared to show an Iranian security officer doing little to stop the attack.
Azerbaijan's President Ilham Aliyev called the attack a "terrorist act."
"Terror against diplomatic missions is unacceptable!" he said in a statement and called for the suspect to be swiftly investigated and punished.
Azerbaijan's Foreign Ministry accused Iran of not doing enough to secure the diplomatic post and said it would evacuate the embassy.
"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," the Azerbaijan Foreign Ministry said.
"Unfortunately, the last bloody terror attack demonstrates the serious consequences of not showing proper sensitivity to our urgent appeals in this direction," it said.
Azerbaijan has had difficult diplomatic relations with Iran. The former Soviet republic is a close ally of Iran's historical rival Turkey. Azerbaijan also has friendly ties with Israel, another foe of Iran, and this month appointed its first ever ambassador to Israel.
Millions of Turkic-speaking ethnic Azerbaijanis live in Iran. The neighboring countries both belonged to the Persian Empire until the early 19th century.