Two Libyan military officers were killed and three soldiers injured when unknown assailants forced their way into a military camp in the desert south, an army spokesman said on Saturday.
The early morning attack happened at the Tamahind base, which was previously a storage place for army equipment under ousted dictator Muammar Gaddafi and is near the desert town of Sabha, some 800 km (500 miles) south of the capital Tripoli.
Sabha residents contacted by phone said the attackers came in eight cars before fleeing.
"They came in by cars, shooting. Two officers were killed and three others were injured," Ali al-Sheikhli, spokesman for the army chief of staff, said. "An investigation is under way."
General Ramadan al-Barasi, military governor for the south, was not in the camp during the attack but his assistant Musa al-Awami was among the casualties, Sheikhli said.
In the chaos since Gaddafi's fall in 2011, the North African country's vast desert south has become a smuggling route for weapons which have reached al Qaeda militants deeper in the Sahara. The lawless region is also a conduit for trafficking legal and contraband goods.
Libya's national congress declared the south a military zone in December and ordered the temporary closure of borders with Algeria, Niger, Chad and Sudan.
The decree gave the defence ministry powers to appoint a military governor with authority to arrest fugitives from justice and deport illegal immigrants.