The UN accused the army of Libya's internationally recognised government on Sunday of deliberately trying to sabotage crunch peace talks with a new offensive in second city Benghazi.

The UN Support Mission in Libya called for an immediate halt to the offensive announced by controversial army chief Khalifa Haftar on Saturday to give peace talks between the country's rival parliaments a chance.

UNSMIL said it "strongly condemns the military escalation in Benghazi".

"The air strikes are a clear attempt to undermine and derail the ongoing efforts to end the conflict at a time when the negotiations have entered a final and most critical stage," it said.

The announcement of the offensive, dubbed Operation Two-Edged Sword, came on the eve of a deadline for Libya's rival parliaments to reach an agreement on a UN-brokered plan for a unified government for the North African nation.

The country has had rival administrations since August of last year when a militia alliance overran the capital and the recognised government sought refuge in the east.

UNSMIL called for an "immediate cessation of hostilities in Benghazi and across Libya... to give the ongoing dialogue in Skhirat the chance to successfully conclude in the coming hours."

Foreign ambassadors gathered in Skhirat on Sunday condemned "the sharp rise in hostilities in Libya... including air strikes against the civilian population in Benghazi".

"This escalation of violence underscores the urgent need to complete the political dialogue process as soon as possible," said envoys for the European Union, France, Germany, Italy, Morocco, Portugal, Spain, Turkey, the United Kingdom and United States.

On Sunday, UN envoy Bernardino Leon expressed hope that the rival sides would finally sign a deal in the Morocco seaside resort of Skhirat later in the day after months of rejected proposals but that did not come to pass.