Islamic State fighters claim they had attacked a training camp for the Libyan military forces Khalifa Haftar on Saturday.
Hospital employees said nine people had been killed in the attack in Libya's southern city of Sabha.
Gen Haftar's eastern forces seized control of key areas in the oil-rich South during a January offensive.
You are now in the northwest, fighting for control of the capital, Tripoli.
In an online statement, the Islamic State said they killed or wounded 1
A military source confirmed to Reuters that a prison had been raided in the camp, but gave no details
Hamed al-Khaiyali, head of the local community, told the news agency that a soldier had been beheaded in the attack, seven others were "slaughtered" or shot.
The Sabha Medical Center later issued a statement in which he placed the police obituary notice at nine.
Gen Haftar has his power base in the east of the country, where he is allied with one of the two rivals governments.
He launched an offensive in January with his Libyan National Army (LNA) in the south, saying he wanted to clean the area of "terrorists and criminal groups."
Last month, Gen Haftar ordered his troops to advance to Tripoli, where they are now engaged in a struggle with fighters allied with the UN-sponsored and internationally recognized government of the National Agreement.
Prime Minister Fayez al-Serraj has praised the defense of the capital and Gen Haftar accused of a coup.
Libya has been affected by violence and political instability ever since long-time ruler Muammar Gaddafi was deposed and killed in 2011.