Tunisia has opened its border with Libya to allow hundreds of people, stranded in dire conditions, to return home.
The reopening came after several hundred Tunisian migrant workers forced their way across the Libyan border at the weekend.
As the coronavirus pandemic spread, hundreds of Tunisians who work in war-torn Libya began to head for home.
But they were unable to cross after their country closed its frontiers on March 16.
People began congregating on the dusty desert road to the border near a crossing point at Ras Jedir, outside the Tunisian town of Ben Guerdane.
Deprived of anywhere to bed down or wash, many were sleeping in a nearby mosque.
The crowd grew so large that Libyan border forces housed them in an open compound, while the International Organisation for Migration and Libyan Red Crescent provided emergency relief.
Federico Soda, the IOM's chief of mission in Libya, said people began to congregate on the Libyan side of the border in early April and by last weekend about 1,000 people were waiting to cross.
"By Sunday things were very tense," Mr Soda told The National.
"We had to pull our people out as it didn't seem that we were contributing to anything.
"My team got the strong sense that people weren't interested in anything other than returning to Tunisia.
"That evening, I'm told that a group of between 200 and 300 people were able to force the gate at the frontier and make their way into Tunisia before the Libyan security were able to regain control."
Tunisia's border guards, realising the seriousness of the situation, summoned reinforcements and eventually opened the gates for a controlled entry.
The government later said the remaining 652 nationals then entered Tunisia, with the last person crossing about 11pm local time on Monday.
Officers then took each person's details.
Coronavirus around the Middle East
"The old people and families were dealt with first and returned quickly to their governorates," said Dr Mongi Slim, head of the Red Crescent's offices in southern Tunisia.
"The men were all interviewed by security to see what they had been doing in Libya and how they had entered the country."
The conflict in Libya has drawn in thousands of foreign fighters, including Tunisians.
Dr Slim said there was resentment in the local community over the treatment of those trying to return.
It was in contrast to the way Tunisia sent European and Gulf workers to comfortable hotels along the coast for quarantine.
With at least 6,000 Tunisians working in neighbouring Libya, many of those yet to return are expected to try to soon make their way to the border.
The coronavirus pandemic is spreading in Libya at the same time as fighting intensifies.
Ramadan, starting this week, is also likely to draw many home to be with their families.
Libyan workers, mainly lorry drivers, are also stranded in Tunisia after Libya closed its borders on March 17 to try to stop the spread of Covid-19.
While the situation is calm, all are relying on the IOM and the Red Crescent for food and water until arrangements can be made for their return to Libya.
There is no official word, as yet, on a plan to allow them to cross.
Despite the turmoil that has engulfed Libya since 2011, the country is a tempting prospect for Tunisian workers.
Large numbers are drawn to work in the oil and gas industry, or what was until recently a healthy building sector, despite the war.
Smuggling has also proved to be a rewarding source of income on both sides of the frontier for decades.