Islamic State militants on Saturday killed at least nine soldiers in an attack on a training camp for the self-styled Libyan National Army in the country's southwestern desert, officials said.

The militants drove their vehicles into the recently established training camp and clashed with guards near an air base seized earlier this year by the LNA, led by Field Marshal Khalifa Hifter, in the town of Sabha, the officials said.

The officials spoke on condition of anonymity because they were not authorized to talk to media.

The medical center in Sabha confirmed the death toll.

The Islamic State group claimed responsibility for the attack, saying at least 16 soldiers were killed or wounded.

Sabha is 650 kilometers (400 miles) south of the capital, Tripoli, where Hifter's forces are currently fighting to take control of the city from militias affiliated with a weak U.N.-supported government.

The U.N. humanitarian agency said Friday that the month-long assault on Tripoli has displaced nearly 55,000 people.

The U.N. Office for the Coordination of Humanitarian Affairs, or OCHA, said that at least 23 civilians have been killed since the LNA launched the offensive to take Tripoli on April 5.

The World Health Organization said the toll as of Thursday was 392 dead, including combatants and civilians. It said at least 1,936 were wounded.

The battle for Tripoli could ignite a civil war on the scale of the 2011 uprising that toppled and killed longtime dictator Moammar Gadhafi.

Since Gahdafi's ouster, Libya has been governed by rival authorities in the east and in Tripoli, in the west, each backed by various militias and armed groups fighting over resources and territory.

Hifter, who in recent years has been battling Islamic extremists and other militias across eastern Libya, says he is determined to restore stability to the North African country. His opponents view him as an aspiring autocrat and fear a return to one-man rule.