* UN urges Libyans to shun force to settle differences
* Protests as interim parliament's original mandate runs out
* Legislature agreed to stay on until later this year (Recasts with protest details)
By Patrick Markey
TRIPOLI, Feb 7 (Reuters) - Several thousand Libyans marched in Tripoli and Benghazi on Friday to demand the dissolution of the interim national parliament, whose mandate was due to run out on Friday with the country divided over its future.
First elected in 2012, the General National Congress (GNC) was to end its term on Feb. 7. But its members have extended its mandate to give a special committee time to draft the constitution seen as a key step in Libya's political transition.
Waving Libyan flags and posters with "No to the extension", protesters filled Martyrs' Square in the capital and main square in the eastern city of Benghazi in peaceful rallies.
Many Libyans have seen no progress at the GNC, which is deadlocked between the nationalist National Forces Alliance (NFA) and the Justice and Construction Party (JCP), the political arm of the Muslim Brotherhood.
Afifa Ahmed, a human resources worker in Tripoli, said the GNC had done nothing in two and a half years since the fall of former dictator Muammar Gaddafi.
"It can't be any more chaotic or worse than it is now," she said. "What has the GNC contributed to the country? Nothing."
Libya's democratic transition is in crisis. Militia in the east have blockaded ports and slashed oil exports, the country's main revenue lifeline. Security remains fragile, highlighted by Prime Minister Ali Zeidan's own brief abduction last October.
Zeidan has managed to survive opponents' attempts to call a vote of no confidence, mostly due to splits among lawmakers.
"I urge all citizens to be committed to peaceful means, all demands can be implemented peacefully and through dialogue," Zeidan said, urging restraint in the GNC standoff.
Libya's messy transition contrasts sharply with its North African neighbour Tunisia, where ruling Islamists have ceded power to a caretaker government to defuse their deadlock with secular opposition parties.
That compromise opened the way to finish Tunisia's new constitution and allow a non-political technocrat cabinet to govern until elections are held around October.
Four decades of one-man rule by Gaddafi left Libyans with little preparation for a smooth transition to democracy.
Reflecting the country's political confusion, most protesters on Friday demanded new elections, but some called for a presidential committee or a high court to replace parliament until elections.
After months of squabbling, the GNC agreed on Monday that a special commission would write the new constitution.
GNC lawmakers say if the commission shows progress in 60 days, they will stay on to assure stability until it finishes. If not, they will hold new elections for a new interim assembly.
Complicating Libya's transition, scores of brigades of former rebels who once fought against Gaddafi and refuse to disarm have allied with competing political factions that often use military muscle to press their demands.
One former rebel commander has occupied main oil ports in the east of the country, cutting off around half of Libya's oil export capacity, to demand more autonomy and a greater share of petroleum wealth for his region.
Two major Libyan rival former militia brigades - the Zintanis and the Misratans - are loosely allied respectively with the NFA and with the Islamist leadership.
Highlighting the tense security situation even in the capital, unidentified gunmen tried to storm the Libyan army's command headquarters in Tripoli on Thursday, exchanging gunfire with soldiers before stealing rifles and military vehicles . (Additional reporting by Ghaith Shennib; Editing by Tom Heneghan)
Our Standards: The Thomson Reuters Trust Principles.