Militia rivalries threaten new war in post-revolt Libya

* Premier's abduction reveals militia rivalries

* Coastal Libyans see Shields Force as counter to Bedouin tribal militias

* Uneasy balance of power holds militias back

By Ulf Laessing and Suleiman Al-Khalidi

TRIPOLI, Oct 18 (Reuters) - 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.

Across the city, powerful tribal Zintan militia, part of a loose alliance of mostly secular Bedouin groups from the desert interior, once recruited into Gaddafi's security forces, control an area around Tripoli's international airport.

The militia rivalries mirror a struggle within Libya's fragile government, where the secular tribal alliance controls the defence ministry and the Islamist-leaning Libya Shield Force works under the interior ministry.

Parliament is split on similar lines, with a secular National Forces Alliance at loggerheads with the political wing of the Islamist Muslim Brotherhood over Libya's future.