Under a blazing sun at a military centre in western Libya, dozens of young recruits learn to march in formation, as authorities train the country's first regular force since its 2011 revolution.
Another makeshift camp has been set up nearby to train future soldiers. On the menu: jumping, climbing, crawling and scaling ropes.
"This basic training marks our passage from civilian life to military life," said Issam Abu Ghnima, a member of the first class of a soon-to-be-formed Presidential Guard.
The 28-year-old, who has two wives, says he lost two children during the NATO-backed uprising that ousted longtime dictator Moamer Kadhafi in 2011.
He decided to join the Presidential Guard "to get ri d of the militias that have destroyed this country". "We want to move on to a new stage: building the state. I think the Presidential Guard is a very good project for starting to build institutions," he said.
Successive transitional authorities over the past six years have been unable to form a regular army or police force, or even to re-establish security in a country controlled by hundreds of militias.
The challenge was underlined again this week as forces loyal to Libya's UN-backed government repelled an attack by rival militias east of Tripoli after three days of clashes.
In the past few months, the Government of National Accord has been working hard to form the new force, which will be tasked with protecting government officials, public institutions and diplomatic missions.
"The international community wants to help us, but in the presence of the militias, it has not found institutions it can rely on," Guard's spokesman Colonel Adnan al-Turki said.
He was talking in front of 200 soldiers gathered at a hall in the training centre in Gharian, 85 kilometres (50 miles) south of Tripoli.
To motivate them, he promised "good wages and bonuses", as well as training abroad.
'Instill ABC of military discipline'
The Presidential Guard, set to form the core of the future Libyan army and police, is to eventually comprise seven brigades.
Colonel Salah al-Triki said the first contingent of 600 soldiers and officers are being trained at centres in Gharian, Tripoli and the western city of Misrata.
A Libyan recruit takes part in military training at a centre in Gharyan, western Libya (photo by: MAHMUD TURKIA/AFP)
After three months of basic training, they choose a speciality according to their skills: special forces, telecommunications, the mechanics' brigade and so on.
The Guard already has 500 operational fighters, recruited from armed groups, whose task is to protect Tripoli's international airport, said General Mohammad Shtiba.
The GNA recently ous ted rival militias to regain control of the airport, which was destroyed by fighting in 2014. "We are now trying to integrate the fighters individually in just three months of training, essentially to instill the ABC of military discipline," Shtiba said.
"Most of them have completed their military service and are well seasoned in combat."
Since 2011, transitional authorities have tried repeatedly to integrate the militias into regular forces controlled by the state.
Thousands of fighters have been trained both inside Libya and abroad. But many militiamen switch allegiance depending on the interest of the day, often ending up rejoining armed groups formed on the basis of regional, tribal or religious affiliations. "We will not make the same mistakes," Shtiba said, without going into specifics.