Updated

Around 400 inmates escaped from a prison in Libya's capital Sunday as fighting continued between rival armed groups nearby, reports say.

Guards at the Ain Zara prison in southern Tripoli feared for their lives as the inmates broke free, Reuters reported.

“The detainees were able to force open the doors,” local police said.

The escape came amid increasing heavy fighting between rival groups in the city, prompting the United Nations-backed Libyan government to declare a state of emergency “given the seriousness of the current situation.”

The U.N. called upon the groups to cease the clashes and hold talks Tuesday.

Most of the prisoners were supporters of the late Libyan leader Muammar Gaddafi, who was removed from power following a NATO-backed uprising against his government in 2011, the BBC reported.

Multiple reports said a missile fell Sunday on a camp in Libya's capital that housed displaced people. The hit killed two and wounded seven people, including two children.

Another rocket hit the Waddan hotel in the center of the capital near the Italian Embassy. Three people were reportedly injured.

On Saturday, a rocket hit a state oil firm NOC’s diesel depot that supplied energy to a power station.

The infighting between rival factions – the Seventh Brigade, based outside Tripoli, and the Tripoli Revolutionaries’ Brigades and the Nawasi, both based in the capital – began last week.

The Tripoli-based government, while technically in charge, allows armed groups to operate with relative autonomy as long as they remain allied with the government.

The U.N. called on the “various concerned parties” to gather Tuesday for an “urgent dialogue on the security situation.”

A joint statement Saturday by the U.S., Britain, France and Italy called for an immediate end to violence in Tripoli.

The statement, according to the BBC, said the attempts “to weaken the legitimate Libyan authorities and hinder the ongoing political process are not acceptable.”

“We are calling on the armed groups to immediately stop all military action and warn those who seek to undermine stability, in Tripoli or elsewhere in Libya, that they will be made accountable for it,” it added.

The Associated Press contributed to this report.