Three years after the overthrow of Muammar Gaddafi, the oil-producing desert state is in chaos, with Islamists and other militias fighting for territory and influence and the regular armed forces reduced to near-impotence.
One faction has seized Tripoli, setting up its own assembly and administration in the capital and forcing the internationally-recognised government to take refuge in the east of the country.
Khalifa Haftar, a former general under Gaddafi, is one of dozens of commanders of irregular forces calling the shots in the country. Last week, his forces launched a new offensive against Islamist militias in the eastern city of Benghazi.
The House of Representatives, Libya's elected parliament which has relocated to Tobruk in the far east, has endorsed Haftar's Operation Dignity against Islamists, giving him an official role, parliament spokesman Farraj Hashem said.
"Operation Dignity is leading officers and soldiers of the Libyan army ... Operation Dignity is an operation of the Libyan army," he said late on Sunday.
The move appears in contradiction to past calls from the House of Representatives for all militias to be disarmed to help restore order and rebuild the state.
The decision to endorse Haftar might also worsen a conflict between the House of Representatives, allied to the internationally-recognised government of Prime Minister Abdullah al-Thinni, and the new rulers of Tripoli.
Both recognised bodies have been based in eastern Libya since an armed group from the western city of Misrata seized Tripoli in August and set up its own assembly and government there.
The Misrata faction has denounced Haftar as a Gaddafi loyalist who is trying to stage a counterrevolution with other officials of the former regime. Haftar helped Gaddafi seize power in 1969 but fell out with the former strongman in the 1980s.
Western powers and Libya's Arab neighbours fear conflict is dragging the North African country towards full-blown civil war.
Last month, the United Nations launched talks between the House of Representatives and elected Misrata members who have boycotted the parliament and who have links to the rival assembly in Tripoli. No progress has been reported publicly so far.