The French government's plan to clear part of the Calais migrant camp known as the "Jungle" has been approved by a court in Lille.
Authorities say around 1,000 migrants will be affected by the eviction plan for the southern part of the camp.
Aid agencies say the number of people living there is much higher.
Local officials said public areas such as places of worship or schools would not be cleared and said it would be a "humanitarian operation".
A deadline had initially been ordered for the southern part of the "Jungle" to be cleared by Tuesday evening but activists appealed to the court to halt the evictions.
The judge visited the camp as she considered her ruling.
Conditions there are squalid and its sprawling presence has become a controversial issue in both France and the UK.
Those living in the camp, mainly from the Middle East, Afghanistan and Africa, hope to cross the Channel to reach Britain.
Calais Mayor Natacha Bouchart said the authorities were being cautious to avoid people squatting on the site. "We're relieved by this announcement but we're vigilant."
Interior Minister Bernard Cazeneuve insisted that the evictions would be a humanitarian operation. "There was never any question of the French government sending bulldozers on to the site," he said earlier on Thursday.
Neighbouring Belgium this week announced temporary controls on its border with France amid fears of an influx of migrants from the camp.
"It's our express intention to avoid tent camps like Calais in our country," Belgian Interior Minister Jan Jambon said.
France described the Belgian move as "strange". Mr Cazeneuve said the very idea of Calais migrants heading for Belgium "doesn't correspond to reality". However, Belgian officials say dozens have already been stopped trying to cross the border.
The Jungle in numbers
- Total camp population is disputed - Calais officials say it houses 3,700, while Help Refugees puts it at 5,497
- Figures for the southern half (facing immediate eviction threat) are estimated at either 800-1,000 or 3,455
- There are 205 women and 651 children (423 unaccompanied), says Help Refugees
- Local government's long-term aim is to have no more than 2,000 migrants living in Calais, says its chief, Fabienne Buccio
Under the judge's order, French authorities cannot use force to move the migrants. The BBC's Tomos Morgan at the camp says they hope to "persuade" everyone to leave.
Police have indicated no evictions will be happening immediately, according to charity workers.
Officials say migrants will have three options: they can move into heated container accommodation at the camp, or similar accommodation elsewhere in France, or they can claim asylum in France.
The French government says its aim is to ensure that no-one has to live in undignified conditions any longer.
But many residents have told the BBC that they do not want to leave.
Save the Children's emergency manager in Calais, Ginny Howells, said the decision would "make a terrible situation for children much worse".