They called for a resolution to Libya's political and economic crises and for joint efforts to battle extremist groups.
Government of National Accord (GNA) leader Fayez al-Sarraj and Field Marshal Khalifa Haftar, whose forces control most of eastern Libya including key oil ports, held rare talks Tuesday in the United Arab Emirates.
In separate statements Wednesday, they called for a resolution to Libya's political and economic crises and for joint efforts to battle extremist groups, without outlining any concrete measures.
The issue of how to form a new Libyan army loomed large in the talks.
Haftar, who commands a self-proclaimed Libyan National Army (LNA), is accused of aiming to install a new military dictatorship in Libya, rocked by a complex multi-sided conflict since the 2011 fall of dictator Moamer Kadhafi.
Sarraj, whose unity government has struggled to impose its control across Libya since it was formed in 2015, said Wednesday the two sides had agreed to put in place "a strategy... to form a unified Libyan army" under civil control.
Haftar's statement said the two sides had agreed to allow "the military establishment... to fully play its role in the fight against terrorism".
Both men said they had agreed to put an end to violence in southern Libya, where LNA and pro-GNA forces clashed in early April around an air base on the edge of the southern city of Sebha.
Haftar is backed by Libya's parliament based in the country's east, as well as by the UAE and Egypt.
That parliament has refused to recognise the GNA, formed under a United Nations-backed deal that gave no role to Haftar and his forces.
Diplomats and observers have described Tuesday's meeting as a positive step forward, after Sarraj said Haftar refused to meet him in person in February.
The United Arab Emirates voiced optimism a political settlement could be reached in Libya after the meeting.
The Tuesday meeting "brings optimism towards guaranteeing a political solution", the UAE foreign ministry said.
It is an "important step to push forward the political process in Libya," it added, in a statement carried by the official WAM news agency.
Apart from the UAE, Algeria, Tunisia and Egypt also played a role in "reconciling the points of view" of Sarraj and Haftar, the GNA statement said.
There has been a flurry of diplomatic activity in recent days to try to reconcile the rival administrations in Libya's east and west.
On Sunday, UN envoy Martin Kobler held talks in Sudan, a supporter of Sarraj's administration.
On Monday, he met Mahmud Jibril, who headed Libya's interim government during the NATO-backed rebellion that toppled and killed Kadhafi.