International powers have begun evacuating personnel from Libya amid a worsening security situation.
US Africa Command said it had relocated an unspecified contingent of US forces, while India said it had evacuated peacekeepers to Tunisia.
Rebel forces under Gen Khalifa Haftar have advanced from the east with the aim of taking the capital, Tripoli.
The UN-backed prime minister has accused him of attempting a coup and says rebels will be met with force.
Libya has been torn by violence and political instability since long-time ruler Muammar Gaddafi was deposed and killed in 2011.
Who is evacuating and why?
Gen Haftar began his offensive four days ago and fighting on the outskirts of the capital has led some international groups to react to the deteriorating security situation.
US Africa Command, responsible for US military operations and liaison in Africa, said that due to the “increased unrest” it had relocated a contingent of US forces, but gave no further details on numbers.
There were reports of a fast amphibious craft being used in the operation.
India’s External Affairs Minister Sushma Swaraj said its full contingent of 15 Central Reserve Police Force peacekeepers had been evacuated from Tripoli because the “situation in Libya has suddenly worsened”.
The Italian multinational oil and gas company, Eni, decided to evacuate all its Italian personnel from the country.
The UN is also due to pull out non-essential staff.
Residents of Tripoli have reportedly begun stocking up on food and fuel. But BBC Arab affairs editor Sebastian Usher says many of those near the fighting are remaining in their homes for now, for fear of looting should they leave.
Some fear a long operation, which Gen Haftar mounted to take the eastern city of Benghazi from Islamist fighters.
What’s happening with the fighting?
Fighting continued on Sunday around the disused international airport south of the capital that Gen Haftar earlier said his forces had seized.
Gen Haftar’s Libyan National Army (LNA) forces have been carrying out a multi-pronged attack from the south and west of the city.
However, forces loyal to the UN-backed Government of National Accord (GNA) have now slowed the advance.
“Intensive air strikes” were carried out by GNA aircraft 50km (30 miles) south of Tripoli on Saturday.
One militia from Misrata told AFP it had aligned with the GNA and had sent armed vehicles to Tajura, in the eastern suburbs, to counter the LNA.
Who are the opposing forces?
Libya has been wracked by unrest since the overthrow of Col Gaddafi. Dozens of militias operate in the country.
Recently they have been allying either with the UN-backed GNA, based in Tripoli, or the LNA of Gen Haftar, a tough anti-Islamist who has the support of Egypt and the UAE and is strong in eastern Libya.
Gen Haftar helped Col Gaddafi seize power in 1969 before falling out with him and going into exile in the US. He returned in 2011 after the uprising against Gaddafi began and became a rebel commander.
The unity government was created at talks in 2015 but has struggled to assert national control.
Prime Minister Fayez al-Serraj delivered a TV address on Saturday, saying he would defend the capital.
Mr Serraj said he had offered concessions to Gen Haftar to avoid bloodshed, only to be “stabbed in the back”.
Back to square one?
Analysis by Rana Jawad, BBC North Africa correspondent, in Tunis
The rogue general’s defiance suggests that, despite international condemnation of his recent moves, he believes he can only secure a place in Libya’s future political makeup through militarily means.
Diplomats are worried, because the manner and timing of the attack means he is unlikely to back down unless he is defeated.
Few thought he would go ahead and launch this operation – which he has long threatened to do – because they believed ongoing talks that saw him go from Paris to Palermo and the UAE for more than a year would buy time until a new political settlement was reached through negotiations and an eventual electoral process.
Today, Western nations have few cards to play to de-escalate the violence and once again find themselves in a position where they may need to start from scratch.
Are peace talks planned?
UN-backed talks aimed at drawing up a road map for new elections have been scheduled for 14-16 April in the Libyan city of Ghadames.
UN envoy Ghassan Salame insisted the talks would go ahead, unless serious obstacles prevented it, saying “we won’t give up this political work quickly”.
UN Secretary General Antonio Guterres was in Tripoli just last Thursday to discuss the situation.
But Gen Haftar has said his troops will not stop until they have defeated “terrorism”.