Rockets have been fired in the direction of the airport in Libya's capital Tripoli, forcing flights to be diverted.

It came less than a week after the United Nations brokered a fragile truce between rival armed groups in the city.

A spokesman for a faction controlling Matiga airport, the only one functioning in the capital, said there were no casualties or damage.

Libyan channels reported that several people had been wounded by the rockets, one of which landed in the Mediterranean. 

Rival groups have been fighting in Tripoli for several days but clashes were focused on the south of the city.

Matiga airport lies in an eastern suburb.

A Libyan Airlines flight bound for Tripoli from Alexandria, Egypt, was diverted to Misrata, about 190km east of Tripoli.

A spokesman for Misrata airport said that all flights bound for Tripoli would be diverted to Misrata.