A security official was killed and two others were wounded when a shooter opened fire at Azerbaijan's embassy in Iran's capital Tehran, the Azerbaijani Foreign Ministry said on Friday.
"The attacker broke through the guard post, killing the head of security with a Kalashnikov assault rifle," it said.
Police in Tehran said they have arrested a suspect and preliminary investigations revealed that the motive stemmed from personal and family-related issues.
The foreign ministry later said Azerbaijan will evacuate its embassy staff in Tehran soon.
Azerbaijani President Ilham Aliyev called the attack "terrorism" and demanded prompt investigation into the attack.
"I strongly condemn the terrorist attack on our embassy in Iran... A terrorist attack on diplomatic missions is unacceptable," Aliyev said in a statement.