A gunman stormed the Azerbaijan Embassy in Iran’s capital Friday, killing its security chief and wounding two guards in an attack that spiked long-simmering tensions between the two neighboring countries.

Azerbaijan’s Foreign Ministry said it would evacuate the diplomatic post, accusing Iran of not taking reported threats against it seriously in the past that include inciting comments in hard-line media over Azerbaijan’s diplomatic ties to Israel.

Tehran’s police chief, Gen. Hossein Rahimi, initially blamed the attack on “personal and family problems,” something quickly repeated across Iranian state media. But within hours Rahimi would lose his position as police chief after footage emerged that appeared to show a security force member doing nothing to stop the attack.

“Previously, there have been attempts to threaten our diplomatic mission in Iran, and it was constantly raised before Iran to take measures to prevent such cases, and to ensure the safety of our diplomatic missions,” the Azerbaijan Foreign Ministry said. “Unfortunately, the last bloody terror attack demonstrates the serious consequences of not showing proper sensitivity to our urgent appeals in this direction.”