Azerbaijan's foreign ministry said "responsibility" for the shooting, which also wounded two embassy guards, lies with Iran – with spokesman Ayxan Hacizada saying a recent anti-Azerbaijani campaign had "encouraged the attack"
A gunman carrying a Kalashnikov-style rifle stormed the Azerbaijan Embassy in Iran's capital Friday, killing the mission's head of security and wounding two guards, authorities said.
The security official was identified by the Azerbaijani government as Lt. Orkhan Asgarov.
Azerbaijan's Foreign Ministry said it would evacuate its diplomatic mission, accusing Iran of not taking reported threats against it seriously in the past.
The assault comes as tensions have been high for months between neighboring Azerbaijan and Iran.
Tehran's police chief, Gen. Hossein Rahimi, blamed the attack on "personal and family problems," according to Iranian state television.
Iranian authorities replaced Rahimi as police chief hours later after footage emerged that appeared to show a police officer doing nothing to stop the attack.
Video purportedly from the scene of the attack showed an empty diplomatic police post just near the embassy, with one man apparently wounded in an SUV parked outside. Inside the embassy past a metal detector, paramedics stood over what appeared to be a lifeless body in a small office as blood pooled on the floor beneath.
A statement from Azerbaijan's Foreign Ministry said that "an investigation is currently underway into this treacherous attack."
The ministry also described the attacker as destroying a guard post with assault rifle fire before being stopped by the wounded guards, whom authorities described as being in a "satisfactory" condition after being shot.
However, the ministry said a "recent anti-Azerbaijani campaign against our country in Iran has encouraged such attacks against our diplomatic mission."
"There have been attempts to threaten our diplomatic mission in Iran before, and measures to prevent such situations and to ensure the safety of our diplomatic missions have been constantly raised before Iran," the ministry said. "Unfortunately, the last bloody terrorist attack demonstrates the serious consequences of not showing proper sensitivity to our urgent appeals in this direction."
'Act of terrorism'
Azerbaijan President Ilham Aliyev called the attack a "terrorist act."
"A terrorist attack against diplomatic missions is unacceptable!" he said in a statement.
Iranian state TV had quoted Rahimi as saying the gunman had entered the embassy with his two children during the attack. However, surveillance footage from inside the embassy released in Azerbaijan, which matched details of the other video of the aftermath and bore a timestamp matching the Azerbaijan Foreign Ministry's statement, showed the gunmen burst through the embassy's doors alone.
Those inside tried to push through metal detectors to take cover. The man opens fire with the rifle, its muzzle flashing, as he chases after the men into the small side office. Another man bursts from a side door and fights the gunman for the rifle as the footage ends.
Another surveillance video from outside the embassy which also corresponded to the same details showed the gunman slamming his car into another in front of the embassy. The gunman then got out and leveled his rifle at a figure inside of the Iranian police stand, likely a police guard, who stood still and did nothing as the man stormed the embassy.
Associated Press journalists saw the embassy's front door pocked with bullet holes after the attack.
Iranian prosecutor Mohammad Shahriari reportedly said that the gunman's wife had disappeared in April after a visit to the embassy. The Iranian judiciary's Mizan news agency quoted Shahriari as saying the gunman believed his wife was still in the embassy at the time of the attack - even though it was some eight months later.
Iran's Foreign Ministry spokesman, Nasser Kanaani, also said his country strongly condemned the attack, which was under investigation with "high priority and sensitivity."
Azerbaijan borders Iran's northwest. There have been tensions between the two countries as Azerbaijan and Armenia have fought over the Karabakh region.
Iran in October launched a military exercise near the Azerbaijan border, flexing its martial might amid the nationwide protests rocking the Islamic Republic. Azerbaijan also maintains close ties to Israel, which Tehran views as its top regional enemy. The Islamic Republic and Israel are locked in an ongoing shadow war as Iran's nuclear program rapidly enriches uranium closer than ever to weapons-grade levels.
Türkiye voices condemnation
Türkiye was prompt to condemn Friday's treacherous attack. The Foreign Ministry in Ankara issued a statement voicing condemnation and extended consolation to the bereaved.
"We condemn the armed attack on the Tehran Embassy of Azerbaijan this morning. We wish God's mercy on the Embassy personnel who died in this attack, and a speedy recovery to the injured," the statement said.
"Türkiye, which has been subjected to similar attacks in the past, deeply shares the pain of the Azerbaijani people," it added.
The ministry also hoped that those responsible for the attack were immediately found and brought to justice and that all necessary measures are taken to prevent its repetition.
"Brother Azerbaijan is never alone. Our support to Azerbaijan will continue uninterruptedly, as always," the Foreign Ministry said.
Earlier Friday, Foreign Minister Mevlüt Çavuşoğlu voiced his strong condemnation and support for brotherly Azerbaijan in a phone call with his counterpart Jeyhun Bayramov.
Minister Çavuşoğlu also expressed his condolences for the embassy officer who lost his life and wished a speedy recovery to the injured.