(CNN) ISIS has claimed responsibility for a deadly assault on the Foreign Ministry of Libya's internationally recognized government in Tripoli on Tuesday, according to the terror group's media wing.
The building was stormed by three men armed with machine guns, a spokesperson for the United Nations-backed Government of National Accord told CNN. Three people who worked there were killed.
One victim was a high-ranking official, the spokesperson added. Eighteen others were injured, according to the Health Ministry.
The gunmen died in the attack that happened at around 9.30 a.m. local time. One gunman is believed to have been killed after an explosion was heard in the top floor of the building, politician Guma El-Gamaty who was in the area said.
"The top floor was totally engulfed in fire; you can still see smoke coming from the building," he said.
ISIS later claimed responsibility, according to a statement released by its Amaq news agency.
Amaq did not provide evidence of the claim that the fighters armed with machine guns and suicide belts carried out the assault.
Related: Week of chaos a reminder that Libya is still broken
Libya's Foreign Minister Mohamed Siala addressed the attack during a news conference in which he called on the international community to lift the UN partial arms embargo.
"Such attacks will not undermine the determination of Libyans to build their state of democracy and law," Siala said. "This attack will not discourage the ministry staff from serving Libya and the Libyan people."
Fayez Al-Sarraj, head of the UN-backed Government of National Accord, and Siala surveyed the site and were briefed about the incident by security officials.
Al-Sarraj expressed confidence that security services will determine the circumstances of the attack and make arrests of those behind it. He passed along his condolences to the families of the victims.
The UN Support Mission in Libya also condemned attack.
"Terrorism will not triumph over the Libyans' decision to move forward towards building their state and renouncing violence. We will not accept any attack on a state institution, especially one committed by a terrorist group," said Ghassan Salamé, the special representative of the secretary general in Libya.
"We will work with the Libyan people to prevent terrorist groups from turning Libya into a haven or an arena for their crimes."