The United Nations refugee agency says it has been ordered to leave Libya.
A spokeswoman said the UNHCR regretted the order to close its office in the country.
"We have not been given any reason by Libyan authorities for why we should leave the country," said Melissa Fleming.
Thousands of migrants from sub-Saharan Africa pass through Libya on their way to Europe each year.
The BBC's Rana Jawad in Tripoli says Libyan officials view the majority of those who claim they are refugees as economic migrants.
A well-informed foreign observer in Tripoli speculates that the problem between the UNHCR and Libyan officials is rooted in their different approach on the issue of refugees and asylum seekers.
There has so far been no official statement from Tripoli on their decision.
Ms Fleming said the expulsion has taken on added gravity because of the Italian policy of pushing back migrants into Libya.
She said the UNHCR, which has been working in Libya since 1991, is important as the North African nation has no procedure for registering refugees.
"UNHCR is the asylum system in Libya," Ms Fleming said.
"This will leave a huge vacuum for the thousands of refugees and asylum seekers who are there already and of course those who continue to arrive steadily on boats."
Many use un-seaworthy boats, to try to sail across the Mediterranean Sea to Europe.
Monday provided the most recent example, the UN says - a vessel containing women and children got into distress but was only rescued 24 hours after the UN had sounded the alarm.
The refugee agency says it wants to continue working to provide safe and durable solutions for such asylum seekers, and is now negotiating with Libya in the hope of remaining in the country.
About 9,000 refugees - mainly Palestinians, Iraqis, Sudanese and Somalis - had been registered in Libya, according to UNHCR figures.
In addition, there are 3,700 asylum seekers, mainly from Eritrea.