Islamic State group militants say they were behind a Saturday attack on a training camp for the forces of Libyan military strongman Khalifa Haftar.
Hospital officials said nine people were killed in the attack in Libya’s southern city of Sabha.
Gen Haftar’s eastern forces took control of key areas in the oil-rich south during a January offensive.
They are now concentrated in the north west, where they are battling for control of the capital, Tripoli.
In a statement posted online, the Islamic State group said it had killed or wounded 16 people in the Sabha attack, as well as freeing inmates from a prison.
A military source confirmed to Reuters that a jail inside the camp had been stormed but gave no further details.
Hamed al-Khaiyali, head of the local municipality, told the news agency that one soldier had been beheaded in the attack, while seven others were “slaughtered” or shot.
Sabha Medical Centre later released a statement putting the death toll at nine.
Gen Haftar has his powerbase in the east of the country where he is allied to one of two rival governments.
He launched an offensive with his Libyan National Army (LNA) on the south in January, saying he wanted to purge the area of “terrorists and criminal groups”.
Then last month, Gen Haftar ordered his forces to advance to Tripoli, where they are now embroiled in a battle with fighters allied to the country’s UN-backed and internationally recognised Government of National Accord.
Prime Minister Fayez al-Serraj has vowed to defend the capital and has accused Gen Haftar of launching a coup.
Libya has been beset by violence and political instability since long-serving ruler Muammar Gaddafi was deposed and killed in 2011.