SKHIRAT (MOROCCO) - The UN said it was trying to narrow differences between Libya's rival parliaments over an agreement aimed at forming a unity government to end unrest tearing the country apart, as fresh fighting broke out near the capital Tripoli.

Special Representative and Head of the United Nations Support Mission in Libya, Bernardino Leon, holds a press conference ahead of a new round of peace talks on the Libyan conflict on April 15, 2015, in the Morrocan city of Skhirat

The differences emerged in written observations by the two sides on the agreement envoy Bernardino Leon is trying to clinch, said Samir Ghattas, spokesman for the UN mission in Libya (UNSMIL).

"We have received the text from the parties on their remarks. There are differences that we are working to narrow," he said in statement texted to AFP.

"But there are many elements that they are in agreement on," he added, without elaborating.

Leon did not meet the delegates Friday, as he had done since the talks to thrash out an agreement resumed two days earlier in the Moroccan resort of Skhirat.

But he reportedly spent the day reviewing written observations to try to find common ground.

The impasse comes as forces of the internationally recognised government attacked a base controlled by the rival administration near the capital Tripoli, with at least 21 people killed in the clashes, including three civilian women.

The fighting marks a new front to the east of Tripoli as pro-government forces attempt to regain the capital, under the control of the rival Islamist-based alliance since August.

Libya has been divided since the 2011 uprising that toppled and killed dictator Moamer Kadhafi, with the two opposing governments and parliaments and armed groups now battling to control its cities and oil wealth.

On March 24, UNSMIL unveiled a six-point plan to end the crisis, including the formation of a transitional unity government until a new constitution is adopted and elections held.