TRIPOLI - When gunmen snatched Libyan Prime Minister Ali Zeidan from his Tripoli hotel last week, it was a rival armed militia he thanked for his rescue hours later.
Even for Libyans accustomed to their democracy's unruly beginnings, the drama at the Corinthia Hotel was a startling reminder of the power former fighters wield two years after they ousted Muammar Gaddafi, and the dangers of their rivalry.
Police and troops from Libya's nascent army were at the scene, but the former militiamen showed they are the arbiters in a struggle between rival tribal and Islamist leaders over the post-revolution spoils of the North African oil producer.
Between them, they have edged Libya close to a new war that threatens the democratic gains of the NATO-backed revolt.
Too weak to take back control of a country awash with Gaddafi-era weapons, Libya's central government has been forced to try co-opt militias into semi-official security services over which it exercises little control.
"We want to build a state with an army, police and institutions, but there are some people who want to obstruct this," Zeidan, still in his pyjamas, told reporters after his release, referring to critics in parliament who had been planning a vote of no confidence, accusing him of failing on security.
Tripoli has been spared the major militia clashes seen in the eastern city of Benghazi. But the standoff is evident; gunmen from two rival groups sit in pickup trucks mounted with anti-aircraft cannons in different parts of the capital.
In the east, the Libya Shield Force and Islamist militias drawn from anti-Gaddafi fighters based in the country's fertile coastal areas and their commanders from Misrata city are entrenched at the Mittiga air base.