The sudden offensive against Tripoli by Libyan strongman Khalifa Haftar has taken pro-government forces and the international community by surprise. But is he really capable of seizing the Libyan capital?
Mr Haftar's self-proclaimed Libyan National Army launched the assault on Thursday as UN chief Antonio Guterres visited Tripoli ahead of a planned conference later this month to hammer out a roadmap for delayed parliamentary and presidential elections.
He believes that "a national conference is a forum in which all the actors must... show they are willing to accept his absolute supremacy," said Jalel Harchaoui, research fellow at The Hague-based Clingendael Institute.
The offensive came weeks after Mr Haftar and key rival Fayez al-Sarraj, who heads the Tripoli-based UN-backed Government of National Accord, met in Abu Dhabi in February to discuss the creation of a new government in which he would be represented.
"Because the new government negotiated at Abu Dhabi was not revealed, Haftar felt that Tripoli players had not submitted enough to him ahead of the national conference," added Mr Harchaoui.
"So he chose military force to change the facts on the ground."
Analysts also believe Mr Haftar wants to affirm his military clout after launching successful operations in the east and the south of the country -- spurred by the fact that the international community failed to react to those past offensives.
He has been encouraged by "the silence of the international community during the previous operations, especially in the south" where he struck tribal alliances, said Tarek Megerisi, an analyst at the European Council on Foreign Relations.
Timing the assault to coincide with Mr Guterres's visit was an act of defiance.
"Haftar made major mistakes. He underestimated the reaction of the foreign powers, being even so daring as to choose the day (Guterres) arrived in Tripoli to order the invasion," said Libyan analyst Kaouthar Hassan.
Analysts believe that Mr Haftar over-estimates the strength of his LNA.
They say the controversial field marshal, who backs an administration rival to the GNA based in eastern Libya, was counting on a quick collapse of Tripoli militias.
But pro-GNA reinforcements from around Tripoli rushed to assist in driving back his forces.
Mr Haftar's first setback took place when he seized control of a key checkpoint known as "Bridge 27" less than 30 kilometres (18.5 miles) west of Tripoli.
Pro-government forces from the coastal town of Zawiya battled them, retook the base and captured more than 100 of his men.
"Haftar is not capable of waging the battle for Tripoli," said Libyan analyst Farhat Asseid.
"He has already faced a moral setback when he hastily decided to attack the checkpoint near Tripoli," he said.
Mr Megerisi agreed, saying, "Haftar is not as strong as he appears and cannot in the end deliver stability to Libya."
Powerful armed groups from Libya's western city of Misrata have also said they were ready to halt Mr Haftar's "cursed advance".
"The Misrata militias are more important (in numbers) than Haftar's forces," said Ali Bensaad, an expert on Libya and professor at the French Institute of Geopolitics.
The self-styled LNA is Soviet-trained and made up of former officers from the Libyan army, militiamen, fighters from allied tribes and Salafists.
"Despite the effective branding, Haftar is not actually in control of an army in the traditional sense of the term," said Mr Megerisi.
"The LNA is a shaky alliance between various militias of tribal, religious and local interests around a core of more traditional forces who themselves are highly compromised by Salafist components."
"From an institutional and historical point of view... it is impossible for now to affirm that Haftar was right to present his coalition as a real army with a relatively clear discipline and a clear chain of command," said Mr Harchaoui.
For Libyan university professor Ahmad al-Messalati, Mr Haftar "is capable of taking Tripoli but only on one condition", if he manages to form "strong and efficient alliances with certain armed groups" in Tripoli to ensure his forces can enter the capital without bloodshed.