Rockets were fired at the only working airport in the Libyan capital Tripoli overnight, with no reports of casualties or damage, an airport source said early on Wednesday.
It came within days of Mitiga International Airport's reopening after it was forced to close for a week because of deadly clashes between rival militias in and around Tripoli.
A Libyan Airlines flight was diverted to Misrata airport, some 200 kilometres east of the capital, the source said, adding that preparations were also underway to move planes on the tarmac in Tripoli to Misrata.
The airport had reopened on Friday after a ceasefire overseen by the UN was signed between the armed groups waging a bloody conflict mostly in Tripoli's southern suburbs.
The agreement has largely been respected but witnesses reported brief clashes in the south of the capital on Tuesday night.
The fighting has killed at least 50 people and wounded 138 others - most of them civilians - since August 27, according to the health ministry.
Thousands of families have fled the violence to nearby towns or have had to seek shelter in other districts of Tripoli, authorities have said.
During heavy clashes last month, at least three rockets landed in the airport's vicinity, forcing staff to reroute all flights to Misrata.
Tripoli has been at the centre of a battle for influence between armed groups since the fall of dictator Muanmar Gaddafi in 2011.
Mitiga, a former military airport in the east of the city, was first opened to civil air traffic after the destruction of Tripoli's international airport in the capital's south during unrest in 2014.
Since then only Libyan airlines have operated in the country, running internal flights and regular connections to a handful of countries, including Tunisia and Turkey.
Libyan airlines are banned from European Union airspace for "security reasons".
Separately in the capital, the ISIS claimed responsibility on Tuesday for a suicide attack a day earlier against the headquarters of Libya's National Oil Corporation which killed two employees.
Three attackers died in the assault on the NOC's offices, ISIS said in a statement published by the US-based SITE Intelligence Group which tracks extremists.
That attack came four months after the headquarters of the country's electoral commission in the capital was hit by suicide bombers, killing 14 people and also claimed by ISIS.
The group gained ground in Libya in the chaos following Gaddafi's ousting and despite being driven in December 2016 from its main fiefdom of Sirte, east of the capital, it continues to carry out deadly attacks.