Azerbaijan's Foreign Ministry said on Friday that one person was killed and two wounded when a gunman opened fire on a guard post outside the Azerbaijani embassy in Iran.

"The attacker penetrated the guard post and killed the security official with a Kalashnikov rifle," the ministry added in a statement.

"The attacker destroyed the guard post with a Kalashnikov automatic weapon, killing the head of the security apparatus, and injuring two security guards as they tried to confront him," the ministry said in a statement.

The Azerbaijani Foreign Ministry also announced the opening of an investigation into the incident, pledging to provide more information to the public about the details of the incident, at a later time.

Azərbaycanın İrandakı səfirliyinə silahlı hücum olub, ölən var pic.twitter.com/YjZ7hbqS8N

- Ictimai TV (@TvIctimai) January 27, 2023

A video clip circulating on social media showed what appeared to be broken glass and damage to a door inside the embassy building.

Police in Tehran said they had arrested a suspect and were investigating the motive behind the attack.

Iran's semi-official Tasnim news agency also reported, quoting the police chief, that the suspect entered the embassy with two children and the motive may have been "personal problems".