TRIPOLI (Reuters) - The United Nations on Thursday evacuated more than 350 migrants from a detention center in southern Tripoli where a fierce battle raged as fighters from rival Libyan camps traded rockets and artillery shells.

A member of the Libyan internationally recognised government forces fires during a fight with Eastern forces in Ain Zara, Tripoli, Libya April 25, 2019. REUTERS/Hani Amara

The Libyan National Army (LNA), led by commander Khalifa Haftar, which is allied to a rival government in eastern Libya, has mounted an offensive on Tripoli but has so far failed to breach the city’s southern defenses.

The group of migrants could be seen traveling on Thursday in buses to a detention center in Zawiya, a town 40 km (25 miles) west of the capital, bringing the total evacuated since Wednesday to around 675.

They came from a facility in the Qasr Ben Gashir district run by the U.N.-backed government in Tripoli, an area that has become the main theater of fighting.

A Reuters reporter in the suburb of Ain Zara, also in southern Tripoli, saw heavy clashes, with both sides using artillery and anti-aircraft guns.

Forces loyal to the Tripoli government have managed to push back the LNA on some southern frontlines though the LNA was still fighting inside southern Tripoli. The Tripoli forces have gained ground in some parts of Ain Zara.

Gunfire rang through a narrow street packed with pickup trucks mounted with anti aircraft guns as fighters allied to Tripoli forces shouted: “Haftar, we are coming”.

One fighter from Zintan, a region west of the capital, was firing his anti-aircraft gun for several minutes. Later he was killed by an incoming rocket, his comrades told Reuters.

Two others from the same armed group died later as shelling from the battle in southern suburbs could be heard in central Tripoli late at night, witnesses said.

The LNA also still holds the forward base of Gharyan, a town 80 km (50 miles) south of Tripoli, which is difficult to take due to its mountainous location.

Hospitals are struggling with chronic shortages of medical supplies amid power outages and weakened water pumping stations, the aid agency said in a statement after three weeks of clashes.

“It is crucial that hospitals, medical facilities, health staff and vehicles transporting the wounded are allowed to carry out their activities safely,” said International Committee of the Red Cross (ICRC) in a statement.

The World Health Organization said on Twitter that 278 people have been killed in the last three weeks, while 1,332 others have been wounded.