BENGHAZI, Libya, Aug 12 (Reuters) - Libya's new parliament agreed on Tuesday that the next president would be elected by a popular vote as lawmakers sought to overcome a confrontation between two armed factions.
Western partners hope the new parliament will open space for negotiations between rival militias and their political backers and return Libya to stability after a month of clashes that turned Tripoli and Benghazi into battlefields.
The House of Representatives voted overwhelmingly for the new president to be directly elected by the Libyan people as it seeks to put the country back on track towards democracy, three years after Muammar Gaddafi's fall in an uprising.
No date has been set for the election, but Libya is caught in its worst violence since the civil war ousted Gaddafi, with armed factions clashing in the capital Tripoli with rockets, artillery and mortars.
"We have made the decision on electing the president directly, but we have not set a date for the vote until we discuss the current crisis and see how stable the situation is," Fatthallah Saiti, a lawmaker, told Reuters.
Three years after Gaddafi's autocratic rule ended, Libya's fragile government has been caught in political infighting that paralyzed the last parliament and empowered rival brigades of heavily armed ex-rebels.
Those factions clashed in the past, but last month their rivalries erupted into heavy street battles that are part of a wider struggle over the spoils of post-Gaddafi Libya.
Since the fighting began, most Western diplomats have pulled out of the country and closed their embassies, fearing the North African oil-producing state is edging closer to another war.
Tripoli was calmer on Tuesday with none of the shelling and rocket fire of recent days. A U.N. delegation has been holding talks with the two factions in an attempt to broker a ceasefire.
On one side are former rebels from the western town of Zintan, and their anti-Islamist Qaaqaa and al-Sawaiq militias, including some ex-Gaddafi forces. Against them are more Islamist-leaning brigades allied to the town of Misrata who are closer to the Islamist political factions.
(Reporting by Ahmed Elumami and Ayman al-Warfalli in Benghazi; writing by Patrick Markey, editing by Mark Heinrich)