The Islamic State on Tuesday claimed responsibility for a gun attack on the Libyan Foreign Ministry in Tripoli that killed three people, including a high-ranking ministry official. Up to 21 others were wounded in the attack.

According to France24, one of the three attackers blew himself up in a suicide-bomb attack on the second floor of the Foreign Ministry building, the second was killed when his suitcase bomb detonated prematurely, and security forces outside the building killed the third.

The assault also reportedly involved a car bomb detonated outside the building, which was engulfed in smoke and flames in photos taken after the attack. Damage to the building was extensive enough to prompt the Foreign Ministry to transfer its operations to a different facility.

Libyan Foreign Minister Tahar Siala identified one of the victims killed in the attack as senior diplomat Ibrahim al-Shaibi, who headed up the Islamic Affairs Department at the ministry.

“Such attacks will not undermine the determination of Libyans to build their state of democracy and law. This attack will not discourage the ministry staff from serving Libya and the Libyan people,” Siala vowed.

Interior Minister Fathi Bashagha described the attackers as men with “African complexions” and said no group had claimed responsibility for the carnage at the time of his press conference, although he condemned “weakness and a security breakdown” for making the attack possible and said the entire country was “out of control,” providing “fertile ground” for ISIS to consolidate its foothold in Libya.

The Islamic State issued a statement through its Amaq news agency taking responsibility for the attack and claiming the killers were “soldiers of the caliphate.”

Ghassan Salame, chief of the United Nations mission in Libya, denounced the “cowardly terrorist attack” and promising to work with the Libyan people to “prevent terrorist groups from turning Libya into a haven.”

“We will not accept any attack on a state institution, especially one committed by a terrorist group,” Salame said.

The British ambassador to Libya called the attack “appalling,” while Italian Foreign Minister Enzo Moavero Milanesi said his government stands in “solidarity with the Libyan people and their just aspiration to real security.”

Islamic State militants in December murdered six people taken captive during an assault on a small town near the Libyan ISIS stronghold of Sirte. In September, the terrorist group claimed responsibility for a suicide attack on the headquarters of Libya’s national oil company, describing the operation as an assault against the “economic interests of the pro-Crusader governments of the tyrants of Libya.”