The UN Secretary General, Ban Ki-moon, has called for peace in Libya during a surprise visit to Tripoli as part of a UN-brokered reconciliation process.On his first visit since 2011, when Col Muammar Gaddafi was ousted, he told MPs meeting at a hotel in the city there was "no alternative to dialogue".
Italian Foreign Minister Federica Mogherini accompanied him.
The UN brokered talks last month between rival parliamentary factions, after months of militia violence.
Instability has plagued the oil-rich country and the new parliament elected in July has been forced to meet outside the capital as rival militias battle for control of the city.
Mr Ban and Ms Mogherini arrived in Tripoli by plane from neighbouring Tunisia, where the UN mission to Libya has been based since it was evacuated during the summer.
MPs were called to a city hotel amid tight security.
"Libya needs a strong parliament and a strong government," Mr Ban told them. "The fighting must stop... Enough of killings, enough of displacements of people."
Ms Mogherini, who is set to become the EU's new foreign policy chief next month, delivered a message of support for the Libyan parliament.
Italy, she said, was "fully committed to staying by your side - on the side of the Libyan people... to save Libya from a destiny it doesn't deserve".