Libya's new parliament agreed on Tuesday that the next president would be elected by 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 have 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 was overthrown.
No date has been set for the election.
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, lawmaker Fatthallah Saiti told Reuters.
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 have 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.
Most Western diplomats have pulled out of Libya 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.
The United Nations mission in Libya, known as UNSMIL, called on both sides to respond positively to efforts to end bloodshed.
"UNSMIL strongly condemns the continuing battles in Tripoli despite the repeated official and international calls for an immediate ceasefire and to refrain from the use of force to resolve political differences," the mission said in a statement.
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.
Misrata and Zintan brigades fought together against Gaddafi, but after the war their rivalries have grown, and each side has competing political factions vying for control. Misrata brigade commanders say they are cleaning out remnants of Gaddafi's forces; Zintan and its allies present themselves as fighting Islamist extremists.