Fierce fighting has broken out near Tripoli as forces linked to General Khalifa Haftar launched a campaign to "liberate" the Libyan capital from a rival administration.

The UN-recognised government of Prime Minister Abdullah al-Thinni said on Saturday that Haftar's troops had been deployed south of Tripoli as it attempted to seize control of the city from the General National Congress (GNC) who govern it.

"The government salutes the operations launched by army units south of Tripoli which constitute the start of an offensive to liberate Tripoli and its suburbs," the Tobruk-based administration said on Facebook. 

Sources told Al Jazeera that air strikes had been carried out in and around the capital, including the airport, but the offensive had so far been repelled.

Residents told the Reuters news agency that the capital was quiet, but television stations linked to the opposing sides gave conflicting accounts of who was in control of two towns west of Tripoli.


RELATED: The rise and rise of Libya's rogue general


The Libya Dawn militia, which backs the GNC, said it had clashed with a group of gunmen who infiltrated Aziziya, a town 35km south of the capital, and captured a number of them.

Bernardino Leon, the UN special envoy for Libya, condemned the attacks "in the strongest possible terms" saying "if it is a major operation then it will clearly have an impact on the dialogue".

Rival politicians from the two administrations have been meeting in Morocco for peace talks amid growing fears that unrest in the north African country could spillover into neighbouring countries.

Western leaders say the UN talks are the only way to end the chaos in Libya, with Leon suggesting the rival factions could be close to reaching a deal.

"By Sunday, we would like to have these documents ready and, if possible, published," he told reporters in Morocco at the start of the latest round of negotiations.


RELATED: What is not being discussed about Libya


However, Al Jazeera's Hashem Ahelbarra, reporting from Rabat, said the talks had been close to collapsing on Friday after the UN warned it would launch actions against those who escalate the conflict.

"Both factions are now trying to implement a ceasefire across the country," he said. "But it's almost impossible to control the militias on the ground."

Talks have dragged on for months in different venues but with little results as fighting continues to escalate.

Thinni's government, which has allied itself with Haftar, was forced to relocate to the eastern city of Tobruk last year after the Libya Dawn seized Tripoli.

Haftar, a Gaddafi-era general who defected in the 1980s, has previously condemned the talks as discussions with "terrorists."

Since longtime leader Muammar Gaddafi was overthrown and killed more than three years ago, the country has grown increasingly polarised as former rebel brigades clash over how to govern Libya and share its oil wealth.

Source: Al Jazeera and agencies