The incident forced the airport to close air traffic and re-route flights to Misrata (Representational)

A Libyan airliner has narrowly escaped being hit by incoming fire as it landed at war-torn capital Tripoli's sole functioning airport, aviation officials said.

"The crew on the flight from Benghazi, which was carrying 124 passengers, avoided being hit by bombing on Mitiga International Airport" on Sunday evening, the airport's management wrote on Facebook.

The incident forced the airport to close air traffic and re-route flights to Misrata, some 200 kilometres (125 miles) further east, until late Sunday night.

The origin of the bombs was not clear, and no side has yet claimed responsibility.

Libyan strongman Khalifa Haftar's forces, who control much of eastern Libya, launched an offensive in April to try to wrest Tripoli from forces backing the Government of National Accord (GNA).

United Nations Libya envoy Ghassan Salame last week warned the Security Council of "the increasing frequency of attacks" on Mitiga airport, controlled by pro-GNA forces.

"Several of these attacks have come perilously close to hitting civilian aircraft with passengers on board," he said.

On Sunday his office condemned the "repeated indiscriminate shelling targeting Mitiga airport, the only indispensable functioning airport available for use by millions of civilians" and aid deliveries in Tripoli.

Mitiga has closed several times since the start of the assault by Haftar, who has accused pro-GNA forces of using the airport for military purposes including as a launch site for Turkish drones to attack his forces.

Located a few kilometres (miles) east of Tripoli, Mitiga is an former military airbase that has been used by civilian traffic since Tripoli's international airport suffered severe damage during fighting in 2014.

The World Health Organization says that fighting since April has left nearly 1,100 people dead and wounded more than 5,750, and forced more than 100,000 civilians to flee their homes.