By Dominic Casciani
BBC News home affairs
The migrants spent their last night defending their camp
France is clearing a makeshift camp at Calais in an attempt to prevent migrants and asylum seekers from collecting at the port. What is the legal position for these people - and do other countries have any obligations?
Who are the people who have been living at the camp at Calais?
It is very difficult to say exactly who they all are - unregulated and illegal migration across Europe is a complicated business, driven by a desire to reach a destination and a huge business network of people smugglers. At its height, there were an estimated 1,000 people living in the camp. Most had travelled across Europe from either Africa or Asia and were planning to try to enter the UK. French officials say that some 170 people have in recent months applied for asylum there rather than try to cross the English Channel.
Why were they living illegally?
Calais is the gateway to the UK thanks to the Channel tunnel, passenger ferry and cargo terminal. But the port is also now part of the British frontier, with extensive and visible security measures in place to try to identify people trying to illegally enter the UK in the back of a lorry. In 2002, the French authorities closed an official Red Cross camp at Calais amid evidence that it had become a magnet for migrants trying to reach the UK. The makeshift camp now being cleared by the French police has grown up in its place in recent years.
So what legal status do these migrants have in France?
Broadly speaking, almost all of them will have arrived in the country illegally after having crossed the southern borders of the European Union at Spain, Italy or Greece. The French government says it will give all the migrants it has detained the opportunity to seek asylum or help them to voluntarily return to their home countries?
Are these people refugees, asylum seekers or illegal immigrants?
Someone only becomes a refugee after they have sought asylum and had their case for sanctuary accepted by the country where they have arrived. Some of those in the camp will be genuinely seeking asylum, having fled from persecution in countries like Afghanistan. However, others will be economic migrants who are trying to reach the UK to make a better life for themselves.
So does the UK have any responsibility for these people?
No. Under a European-Union wide agreement, it is not the UK's problem and the home secretary is under no legal obligation to take any of the migrants from France. But that is only part of a very complex picture which exposes the fault lines within the EU over migration policy.
So what is the bigger problem?
The 27 EU states are all part of an agreement which states that the country where an asylum seeker first arrives should deal with the case.
If a migrant does reaches France or the UK, the authorities there can send them back to the first EU country the individual reached, providing they can prove they were there. In practice, this is not how it happens.
For a start, many asylum seekers who arrive in Italy and Greece try not to register. If they did, their fingerprints would end up on the Eurodac database - meaning they would be identified as soon as they applied in their favoured destination, such as Germany or the UK.
Secondly, almost every migrant who arrives in Greece has an asylum claim turned down. And so, in the words of one UN official, "they stick to the bottom of a truck and carry on".
Many European and UN officials believe the system is dysfunctional and prevents the EU nations working together on a phenomenon which affects them all.
Is the UK under any pressure to step in?
The EU has denied reports that it wants the law changed to make the UK and other states share some of the migrant burden - but that is hardly a realistic prospect.
However, many UN officials think that states like the UK should take a more "flexible" approach to how they implement the EU rules. For example, they argue that if a migrant in a vulnerable situation can prove they have relatives legally resident in the UK, then it makes more humanitarian sense for the case to be assessed there.
This, however, raises huge political problems for the UK because the government has battled to clamp down on "chain migration" where entire families ultimately follow the trail of a pioneer.
Why do they want to come to the UK?
People have personal motivations but most migration experts agree that the UK has some unique pulling points.
Top 10 nationalities applying for asylum in the UK
Sri Lanka: 1,475
Source: 2008 immigration statistics, Home Office
Firstly, there is the historic links of language and culture with other parts of the world. Migrants tend to head for places where they can speak the language which is why, historically, French-speaking Arabs did not end up in large numbers in the UK.
But a very important factor is the fact that the UK - and in particular London - is home to an incredibly diverse range of communities. This means that people who arrive think they will find it easier to settle because they have family or friends there to help them.
Critically, anecdotal reports tend to show that migrants who arrive in these communities do so with the expectation of disappearing from view into the black economy.
What role does enforcement place in deterring people?
It is difficult to say. What is clear is that many migrants know that they will have a rough time in Greece - and they also know that it is extremely difficult to get across the English Channel.
But, when they are asked, they say the risks are worth it, when they think about the life they are trying to leave behind.
Where enforcement has had an impact is in fines that force haulage firms to do more to identify migrants trying to reach the UK in the backs of their lorries. Anyone who queues up to join a ferry at Calais these days will see security staff using special monitors to detect breathing inside cargo containers.