Tripoli (AFP) - UN envoy Martin Kobler urged rival Libyan politicians to sign up to a UN-brokered agreement for power sharing in the war-torn nation during weekend talks with both sides.

Kobler, on his first visit to the North African country since taking up his new job last week, met members of the internationally recognised government and parliament in the eastern city of Tobruk on Saturday and those of a rival administration in Tripoli on Sunday.

In news conferences in Tobruk and Tripoli he urged politicians to rally around a UN deal proposed by his predecessor Bernardino Leon to set up national unity government.

"We cannot reopen the Libyan agreement now," Kobler told reporters in Tobruk after talks with Libya's foreign minister, second vice president and lawmakers.

"I encouraged and I urged the members of the House of Representatives to go for a positive vote. This country deserves better than being in a bad economic state like now," he said.

After almost a year of arduous negotiations, Leon proposed in early October a power-sharing deal under which Libya would be governed by a nine-member presidential council made up of a prime minister, five deputy premiers and three senior ministers.

But lawmakers from Libya's internationally recognised parliament and its Tripoli-based rival have balked at the deal and the names put forward by Leon.

Libya has had two administrations since August 2014, when an Islamist-backed militia alliance overran Tripoli, forcing the recognised government to take refuge in the east.

Kobler, a veteran German diplomat, said Libya was striving for security and prosperity and insisted that "a sound political development" was essential to reach those goals.

"One cannot wait until all the problems are solved," he said in Tobruk.

He made similar remarks in Tripoli after talks with the head of the General National Congress or parliament.

"We can discuss unresolved issues but should go for rapid signature of agreement on basis of where Leon left the process," he said, according to a tweet posted by the UN mission in Libya.

"The country needs legitimate institutions, strong institutions," Kobler said.