One security official has been shot dead and two guards wounded when an attacker armed with a Kalashnikov-style automatic rifle stormed Azerbaijan's embassy in Iran's capital, Tehran.
Azerbaijani President Ilham Aliyev called the January 27 assault "an act of terrorism" and Baku quickly announced it was evacuating the embassy while blaming Iran for the incident.
"The attacker broke through the guard post, killing the head of security with a Kalashnikov assault rifle," Azerbaijan's Foreign Ministry said.
Iranian state TV quoted Tehran Police Chief Hossein Rahimi as saying the attacker was arrested and that he had "personal and family problems."
Rahimi said the attacker entered the embassy with two children. However, surveillance footage from inside the embassy released in Azerbaijan appeared to show the shooter entering the building alone. The footage bore a timestamp matching the Azerbaijan Foreign Ministry's statement.
Iran's Foreign Ministry spokesman, Nasser Kanaani, said Tehran strongly condemned the attack, which was under investigation with "high priority and sensitivity."
Iran and Azerbaijan have a common border. Relations between the two countries have been tense amid the conflict between Azerbaijan and Armenia over the Nagorno-Karabakh region.
"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 terrorist be punished.... Terror against diplomatic missions is unacceptable!"
Azerbaijani Foreign Ministry spokesman Ayxan Hacizada told local media that "all responsibility for the attack lies with Iran" as a recent anti-Azerbaijani campaign in Iranian media had "emboldened the attack."
"Unfortunately, the latest bloody terrorist act demonstrates the serious consequences of the failure to give the necessary attention to our constant appeals in this regard," Azerbaijan's Foreign Ministry said in a statement.