Libyan commander Khalifa Haftar's forces on Saturday ruled out a UN call to return to the negotiating table, with his spokesman saying a military solution is the best way to resolve the conflict.

Libya has been wracked by chaos since the 2011 uprising in which its longtime leader Muammar Gaddafi was killed. In April, Haftar's self-styled Libyan National Army (LNA) launched an offensive to conquer the capital, Tripoli.

"The battle is in its final phases," LNA spokesman General Ahmed al-Mesmari told a news conference in the United Arab Emirates, one of Haftar's foreign backers, AFP said.

"When the guns speak, diplomacy goes silent. The time of going back to dialogue is over," he said. "The military solution is the best solution to spread security and reimpose the law."

Haftar's forces are fighting those of the UN-recognised Government of National Accord (GNA) led by Fayed al-Sarraj.

At least three GNA fighters were killed in an offensive on Saturday aimed at pushing back Eastern forces led by Haftar, a witness said.

The clashes between the GNA forces and Haftar's LNA on Saturday morning came after almost a month of calm.

"Three fighters allied to GNA from Misrata were killed in the offensive in Tripoli this morning," the witness told Reuters.

How Libya's skies became battleground for UAE-Turkey proxy war Read More »

An LNA military source said the offensive was repelled and the LNA maintained its positions. The source added that five LNA troops were wounded.

Neither side claimed significant advances.

Almost five months after launching the offensive, Haftar's forces remain locked in a stalemate against the GNA on Tripoli's southern outskirts.

Sarraj is backed by Turkey and Qatar, while Haftar enjoys varying levels of support from Egypt, the UAE, the United States, Russia and France.

The UN special envoy to Libya, Ghassan Salame, warned on Wednesday that without action by the Security Council, the conflict may escalate if outside patrons step up support for the warring sides.

"Many Libyans feel abandoned by part of the international community and exploited by others," he said.

The envoy said the country faced "two highly unpalatable scenarios" - either protracted low-intensity conflict, or increased support for the warring sides that would trigger a sharp escalation.

"The idea that war should be given a chance and that a military solution is at all possible is quite simply a chimera," Salame said.