Tehran: A security staff was killed while two others were injured when a man allegedly opened fire at Azerbaijan's embassy in Iran, Turan News Agency reported.

As per the news agency, the attacker, carrying a machine gun and opened fire at an employee of the security service of the embassy. Two others were also reported injured in the incident.

The Azerbaijani Foreign Ministry said in a statement that the deceased was the head of the embassy's security service Orkhan Askerov.

After the attack, Iranian authorities confirmed that the perpetrator was arrested but his name was not made public.

According to the IRNA news agency, the police are investigating the case.

Tehran Police shief Hussain Rahimi said the attacker entered the Embassy with his two children. Preliminary reports say that the motive for the attack was "personal and family problems".