Italy's government has asked the European Union to come up with contingency plans for a possible mass movement of refugees fleeing the fighting in Libya as diplomats struggle to rein in the burgeoning civil war for control of the country's capital.
The move came as human rights groups condemned a "horrific" attack by soldiers on migrants caught up in fighting in southern Tripoli.
Amnesty International said Tuesday's assault on the Qasr Ben Ghashir detention center, which hold 890 people, should be "investigated as a war crime."
The UN said 12 people needed hospital treatment after "armed actors" breached the compound.
At least 264 people have been killed and more than 1,200 wounded since April 4, when General Khalifa Haftar, the head of the Libyan National Army which controls eastern Libya, launched an assault on Tripoli, the seat of the internationally recognised Government of National Accord.
The government warned earlier this month that up to 800,000 foreign migrants and Libyans could attempt to make the crossing to Europe if the fighting does not stop.
About 3,600 migrants are held in facilities close to the main battlefield on the southern outskirts of Tripoli.
Speaking after meeting Ghassan Salame, the United Nation's envoy to Libya, Enzo Moavero, the Italian foreign minister, said he had written to European chiefs to request preparations be made for "the event of large and sudden flows of migrants from Libya".
European treaties require member states to assist Italy in the event of a resumption of mass immigration across the Mediterranean.
Mr Salame said his team had made some progress in brokering new talks and he hoped "the contacts we have established or re-established among the two belligerents can bear fruit before the holy month of Ramadan," which starts on May 5.
Diplomacy on Libya has been hampered by rifts between world powers over how to handle the crisis.
British diplomats were stunned last week when the US joined with Russia to block a UK resolution that would have censured Gen Haftar's forces for starting the latest round of fighting.
A day after deadlock at the UN, the White House revealed Donald Trump, the US president, had spoken to Gen Haftar and praised his "significant role in fighting terrorism and securing Libya's oil resources".
Fayez al-Sarraj, the prime minister of the GNA, on Wednesday openly accused France of backing Gen Haftar and said Paris' support for the General had encouraged him to launch his offensive.
"We are surprised that France does not support our government that is democratic, but supports a dictator," Mr Sarraj said in an interview with the Liberation newspaper.
"When (French president) Emmanuel Macron called me, I warned him that public opinion was against France. We don't want Libyans to hate France. France still has a positive and important role to play," he said.
France has denied prior knowledge of Gen Haftar's assault on Tripoli, but French policymakers have expressed sympathy for Gen Haftar's claims to be fighting Islamist terrorism in the past.
Russia has also extended support to Gen Haftar.
Kheiri Al Tamimi, a high-ranking aide to General Haftar, was seen at a conference organized by the Russian military in Moscow on Wednesday.