One guard was killed after an attacker targeted the post of Azerbaijan's diplomatic mission in Tehran with a Kalashnikov weapon.
A guard has been killed in an armed attack on Azerbaijan's embassy compound in Iran, the nation's foreign ministry has said.
Two people were also wounded in Friday's attack.
"The attacker destroyed the guard post with a Kalashnikov automatic weapon and killed the head of the security service. Two security guards of the embassy were also injured while preventing the attack," Azerbaijan's foreign ministry said.
The ministry said it would evacuate its embassy staff in Tehran.
The Iranian capital police chief, General Rahimi, said the attacker entered the embassy with his two children.
"Preliminary investigation shows that the attacker's motive was personal and family problems," Iran's local Mehr News Agency reported.
One guard was reportedly killed and two others injured after an attacker targeted Azerbaijan’s embassy in Tehran with a Kalashnikov riflepic.twitter.com/BjQS6Gb2Jv— TRT World (@trtworld) January 27, 2023
'Act of terrorism'
Azerbaijan's President Ilham Aliyev said that an attack on his country's embassy in Iran was "an act of terrorism" and demanded a swift investigation and punishment of the "terrorist".
"I fiercely condemn the terrorist attack perpetrated against our Embassy in Tehran today," Aliyev said on Twitter.
"We demand that this terrorist act be swiftly investigated and the terrorists punished," he added.
Turkish President Recep Tayyip Erdogan strongly condemned "the heinous attack."
"We convey our condolences to our Azerbaijani brothers and wish a speedy recovery to the wounded," Erdogan said on Twitter.
Türkiye stands by "its dear friend and brother Azerbaijan," he added.
Turkish Foreign Minister Mevlut Cavusoglu also condemned the "treacherous attack" in a tweet.
"Azerbaijan is never alone," Cavusoglu added.
Separately Turkish Foreign Ministry issued a statement regarding the deadly attack, saying that Türkiye which has been subjected to similar attacks in the past, deeply shares the pain of the Azerbaijani people.
"It is very important that those responsible for this heinous attack should be immediately apprehended and brought to justice," the ministry said.
Nasser Kanani, the spokesperson of the Ministry of Foreign Affairs of Iran also condemned the attack and said the suspect was detained.
"Police and security forces immediately intervened and arrested the assailant, who is currently under investigation," the spokesman said.
The foreign ministry also noted that the situation is under investigation with dimensions of action and the motive of the assailant.
Azerbaijan borders Iran to its 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 one of its top regional enemies.