Libyan forces have regained control of the main airport in Tripoli, after an armed militia overran the runway demanding their leader's release.
Dozens of the militiamen who drove armoured trucks onto the runway forcing flight diversions have been arrested, Libya's deputy interior minister said.
Earlier, gunfire was heard when troops and other militias entered the airport to oust the brigade.
The al-Awfia brigade had refused to leave until their demands were met.
It is unclear exactly how the stand-off was resolved and whether the government made concessions to the brigade.
The BBC's Rana Jawad in Tripoli earlier witnessed armoured vehicles carrying security forces and militiamen from various armed brigades entering the airport to evict the occupying force.
There have been no reports of casualties, although Omar Khadrawi, Libya's deputy interior minister, said a hangar had been blown up and a field set alight.
"The authorities have complete control over the airport," Mr Khadrawi told journalists in Tripoli.
He described the militia that occupied the runway as saboteurs.
The group, from the town of Tahrouna in western Libya, began the occupation in protest against the disappearance of one of their commanders.
It is not clear where the man is or whom he is being held by.
"One of their leaders yesterday was coming to Tripoli with two tanks, and at an inspection point they found no documents... so they took the guns and tanks from him and he returned back," Mohammed el Harezi, a spokesman for the Libyan government, told the BBC.
"Then suddenly this guy, he was kidnapped, he disappeared. So this is the group who supported him. They came to the airport asking for his release and they thought he might be in the airport area," he added.
The spokesman said that the force agreed to leave after negotiations.
The brigade had placed a pick-up truck mounted with an anti-aircraft gun underneath each of the six planes on the tarmac, our correspondent says.
Airport sources told the BBC that at least three airlines had to cancel their flights.
Several international airlines have resumed flights to Libya since the end of the conflict which toppled Muammar Gaddafi.
Libya's interim government took control of the airport in Tripoli in April, taking over from militia fighters who held control until then.
Tripoli says the international airport will be shut for the next 24 hours to resolve technical issues.
The incident comes as Libya's governing National Transitional Council prepares to hold elections for a constituent assembly in the coming weeks.