Image copyright Getty Images

There are tens of millions of people in the world who have fled their homeland because of war or persecution. But there are millions more who cross borders to be with family, to retire to a warm climate, or to earn more money. Countries have the right to restrict immigration, at least in theory. The question is whether they should have this right.

This week the BBC begins a new experiment in philosophy, The Global Philosopher, presented by Michael Sandel. The programme uses a state-of-the-art studio at the Harvard Business School in Boston, which allows people around the world to come together for a global discussion. Here producer David Edmonds sets out some philosophical puzzles connected with borders and immigration.

Refugees v Immigrants

Image copyright Getty Images

According to international law, everyone has a right to seek asylum from persecution or war. There is no automatic right to move elsewhere for economic reasons. But the distinction between refugees and immigrants cannot always be so neatly drawn.

Compare the wealthy banker who wants to transfer to another financial centre, where the bonuses are higher, with the farmer who wants to emigrate because there's been a drought and the crops have failed. The latter seems closer to the political refugee. Is there any morally relevant difference between people dying from bombs and others dying from extreme poverty?

Wealth v Identity

Two sorts of justifications are usually given for restricting immigration - the first to do with wealth, the second with identity.

Immigration, it's often said, would adversely affect the lives of existing citizens. Foreigners might take jobs that would otherwise have gone to locals, or they might drive down wages, or stretch public services, such as health and education. Of course, whether these fears are really warranted is much contested.

That argument aside, the second rationale for border controls is cohesion. To a philosopher, this is more intriguing. Countries function best, it's sometimes said, when citizens have a powerful sense of identity - an identity shaped by a shared history, religion, culture. Foreigners threaten that solidarity, and so undermine the fabric of society. If we view many of our compatriots as "them" rather than "us", perhaps we'll be less willing to support (through our taxes or labour) the services that glue a nation together. For some countries, that sense of interconnection is fragile. The former Yugoslavia rapidly unravelled in the 1990s when Slobodan Milosevic began to push a Serbian nationalist agenda.

Media playback is unsupported on your device Media caption Is preserving national identity a reason to restrict immigration?

But if we acknowledge that social cohesion provides a compelling basis for border controls, then we're forced to conclusions that some would find uncomfortable. For, surely, some immigrants are more likely to threaten our sense of unity than others. That logic points to a system which privileges entry to immigrants who most resemble us - racially, religiously or culturally. Are countries stronger when they are ethnically and culturally homogenous?

Compatriots v Foreigners

It's widely assumed that we have special obligations to our compatriots that we do not have to foreigners. Victims of a hurricane or flood in our own country have more of a claim on us than victims on the far side of the world. But this is a bit puzzling. Take UK citizens living in Dover: why do they owe more to the inhabitants of Middlesbrough, in North England, 260 miles away, than to refugees in a Calais camp just 26 miles away? Or take an indigenous people divided by the border between the US and Mexico: should they have a greater sense of obligation to their distant compatriots than to their tribal members living close, but abroad? Many of the world's national borders are the result of contingent historical factors - drawn with little regard to sentiment.

Media playback is unsupported on your device Media caption 'Why does identity have to be about nations?'

Free Exit v Free Entry

Most people believe that it's wrong to prevent citizens from leaving their country - it's regarded as an infringement of human rights to seal borders. In 1987, former US President Ronald Reagan delivered a famous speech in Berlin, calling on the then Soviet leader Mikhail Gorbachev to "tear down this wall". The power of his appeal lay in the intuition that imprisoning an entire population behind brick, barbed-wire and guard-towers was an abomination. Those who'd attempted to cross the Berlin Wall had been shot, and more than 100 killed.

Image copyright Alamy

But there's a conundrum here. For if it's wrong to prevent a person leaving, why is it not equally wrong to prevent that same person from arriving? It's all very well to have the right to emigrate, but it must feel like a pretty empty freedom if there is nowhere to go.

Watch the full video of The Global Philosopher now, or listen at 09:00 on Tuesday 29 March on BBC Radio 4.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.