An air strike that hit a detention centre for migrants in the Libyan capital of Tripoli, killing at least 44 people and wounding 160 others could constitute as a "war crime", according to the UN.

Key points: Libya's Government has blamed the Libyan National Army, allied to a parallel regime, for the attack

Libya's Government has blamed the Libyan National Army, allied to a parallel regime, for the attack The LNA has denied the accusation and says a Tripoli-backed militia shelled the centre

The LNA has denied the accusation and says a Tripoli-backed militia shelled the centre The detention centre hit by the air strike mainly housed migrants fleeing other parts of Africa

It is the highest reported death toll in an air strike since eastern forces loyal to rebel military General Khalifa Haftar three months ago launched an offensive to wrest control of the capital from the internationally recognised Government.

United Nations Libya envoy Ghassan Salame condemned the strike, saying it "clearly amounts to the level of a war crime".

"The absurdity of this ongoing war has today reached its most heinous form and tragic outcome with this bloody, unjust slaughter," Mr Salame said in a statement

The conflict is part of chaos in the oil-and-gas-producing nation since the NATO-backed overthrow of former leader Muammar Gaddafi in 2011.

It is the highest reported death toll in an air strike since an insurgent offensive was launched three months ago. ( AP: Hazem Ahmed )

The centre, which mainly houses migrants from other parts of Africa, is located next to a military camp.

The Tripoli-based Government said dozens of people had been killed and wounded in an air strike blamed on the "war criminal Khalifa Haftar".

Photographs showed migrants undergoing surgery in a hospital after the strike.

Others lay on beds, some covered in dust or with limbs bandaged.

Libyan Red Crescent workers were among those who responded after the air strike. ( AP: Hazem Ahmed )

Libya is a main departure point for migrants from other parts of Africa fleeing poverty and war and trying to reach Italy by boat.

However many get picked up by the Libyan coast guard, with support from the European Union, which wants to stem migration.

Thousands of migrants are held in government-run detention centres in western Libya in what the United Nations says are often inhuman conditions.

Forces on all sides continue to trade blows despite international calls to stop the violence. ( Reuters: Hani Amara )

Tajoura, east of Tripoli's centre, is home to several military camps of forces allied to Libya's internationally recognised Government, which have been targeted by air strikes for weeks.

On Monday, General Haftar's Libyan National Army (LNA), which is allied to a parallel government based in Tobruk, said it would start heavy air strikes on targets in Tripoli after "traditional means" of war had been exhausted.

An LNA official denied his force had hit the detention centre, saying militias allied to Tripoli had shelled it after a precision air strike by the LNA on a camp.

General Haftar has the backing of Egypt, the United Arab Emirates and Saudi Arabia. ( AP: Ivan Sekretarev, file )

The LNA air campaign has failed to take Tripoli in three months of fighting, and last week LNA lost its main forward base in Gharyan, which was taken back by Tripoli forces.

Both sides enjoy military support from regional powers.

The LNA for years has been supplied by the United Arab Emirates and Egypt, while Turkey recently shipped arms to Tripoli to stop General Haftar's assault, diplomats say.

The conflict threatens to allow Islamist militants to fill a security void, disrupt oil supplies, boost migration across the Mediterranean to Europe, and scupper UN plans for an election to end rivalries between parallel administrations in the east and west.

Reuters