Libya has declared a state of alert as the air force attacked gunmen in the remote south to end unrest between rival armed groups that have been clashing for days.

The General National Congress, Libya's highest political authority, took the decision on Saturday during an "extraordinary session" after the parliament put the army on alert as gunmen stormed the air force base, Tamenhant, near the southern city of Sabha, an official said.

"A force was readied, then aircraft moved and took off and dealt with the targets," Abdul-Raziq al-Shabahi, defence ministry spokesman, told reporters in Tripoli.

He said the army was tracking the attackers after they fled into the desert.

Earlier on Saturday, Prime Minister Ali Zeidan said a small group of gunmen had entered the air force base outside Sabha, 770km south of the capital Tripoli, but the government was in control of the town and its civilian airport.

"This confrontation (at the air base) is continuing but in a few hours it will be solved," the prime minister told a televised address, without elaborating.

Zeidan said he had sent his defence minister to Misrata to instruct troops based there to move to the south.

"The troops from Misrata have been commissioned by the government to conduct a national task ... to spread security and stability in the region," he said in the address.

Tribal clashes

Local sources said the clashes that started last week were sparked by the death of a rebel chief linked to the Awled Sleiman, adding that the tribe accused the Toubou of murdering him.

The Toubou are black oasis farmers by tradition who also live in southern Libya, northern Chad and Niger, who have repeatedly said they were being marginalised.

Western powers fear the OPEC producer will slide into instability as the government struggles to contain heavily-armed groups and tribesmen who helped topped Muammar Gaddafi in 2011 but refuse to disarm.