Since the end of World War Two, immigration has transformed the UK.
After the war, fewer than one in 25 of the population had been born outside the country; today that figure is closer to one in seven.
Many moments have contributed to this transformation in net migration. Here are five key turning points.
1948: The Windrush Generation
In the aftermath of the war, the UK saw huge investment in public infrastructure. Bombed cities were rebuilt, transport systems expanded and new institutions, such as the NHS, had to be staffed.
Employment opportunities abounded, and people from all over the Commonwealth came to the UK to help fill the labour shortage.
Some of the first to arrive in 1948 were a group of 500 or so Caribbean migrants, who arrived on former troopship the Empire Windrush. Consequently, they and the 300,000 West Indians who followed them over the next 20 years, were known as the Windrush generation.
Alongside those from the Caribbean came some 300,000 people from India, 140,000 from Pakistan, and more than 170,000 from various parts of Africa.
492passengers docked in Essex on the Empire Windrush in 1948
910,000 peoplefrom the West Indies, India, Pakistan and Africa followed
500,000current UK residents were born in the Commonwealth pre-1971
18were apologised to for being wrongfully deported or detained
Immigrants from the Republic of Ireland had the same rights, and also flocked to the UK. Between 1948 and 1971, one-third of 18 to 30-year-olds left the country in search of work, about half a million people. The overwhelming majority of them were bound for the UK.
In the 1940s and 50s, none of these people required visas; as "citizens of the United Kingdom and Colonies", they were automatically given the right to reside in the UK.
However, the Home Office did not keep a record of those granted leave to remain. Despite living and working in the UK for decades, it emerged in 2018 that some Windrush migrants and their families had been threatened with deportation and even removed. The UK government was forced to apologise.
1956: The Hungarian Revolution
The end of World War Two also brought huge political changes in eastern and central Europe.
After liberating the region, the Soviet Union installed Communist regimes here that were deeply unpopular with many people. It also annexed the Baltic States and parts of Poland.
In reaction, hundreds of thousands of refugees fled to the West. The first to arrive in the UK were about 120,000 Poles, who arrived in 1945; the substantial Polish communities in Manchester, Bradford and west London date from this time. About 100,000 people from Ukraine and the Baltic States also came to the UK for similar reasons.
At the time, these population movements were considered the final consequences of World War Two. In fact, they were the symptom of a new Cold War.
This was confirmed in 1956, when the people of Hungary rose up against their Communist rulers. After Soviet tanks drove into Budapest to crush the uprising, almost 200,000 Hungarians fled the country.
Britain took in 30,000 of these political refugees, setting a precedent for the years to come. From 1956 onwards, political dissidents from eastern Europe were routinely accepted and integrated into British society.
Some of the data in this article is drawn from BBC Briefing, a mini-series of downloadable in-depth guides to the big issues in the news, with input from academics, researchers and journalists. It is the BBC's response to audiences demanding better explanation of the facts behind the headlines.
1971: Immigration Act
The post-war boom in immigration from Commonwealth countries was not welcomed by everyone.
In the late 1950s, racial tensions erupted in a series of riots, most famously in 1958 in Notting Hill and Nottingham.
And in 1968, the Conservative politician Enoch Powell spoke out against continued immigration, in his divisive "Rivers of Blood" speech.
Under considerable pressure, the British government eventually cracked down on all forms of racial discrimination.
The most important of these was the Immigration Act of 1971, which decreed Commonwealth immigrants did not have any more rights than those from other parts of the world. This effectively marked the end of the Windrush generation.
More like this:
1972: The Ugandan Asian Crisis
The first major test of the new immigration rules came the following year when war-torn Uganda, a former British colony, announced the immediate expulsion of its entire Asian community.
Prime Minister Edward Heath declared the country had a moral and legal responsibility to take in those who had UK passports. Of the 60,000 people expelled, a little under half came to the UK.
This highlighted a change of emphasis in immigration policy. The UK was now wary of people coming in search of jobs, but it would continue to welcome those coming in search of asylum.
Throughout the 1970s and 1980s, fewer than 5,000 asylum seekers came to the UK each year, on average. But in 1990, after the fall of the Berlin Wall, applications for asylum rose suddenly to more than 16,000 people. In the following two years this figure doubled, and then doubled again.
This trend would continue over the following decade, as instability in countries like Yugoslavia, Somalia and Iraq brought more refugees to the UK's door.
1992: The EU expansion
In 1992, the UK joined other EU nations in signing the Maastricht Treaty on European integration. This granted all EU citizens equal rights, with freedom to live in any member state they chose.
In the following decade, tens of thousands of EU citizens came to live and work in Britain.
Few people protested, possibly because these newcomers were balanced out by the tens of thousands of British people who moved away to other parts of the EU.
Nevertheless a new principle had been set. Just as the country had once held an open door to the Commonwealth, so it now held an open door to the European Union.
In 2004, the EU was expanded to include seven nations from the Eastern Bloc- Estonia, Latvia, Lithuania, Poland, the Czech Republic, Slovakia, and Hungary - while Slovenia, Malta and Cyprus also joined at the same time.
Unlike Germany or France, the UK put no temporary restrictions on arrivals from these new member states.
Tony Blair's Labour government had a positive stance on immigration: it argued a growing economy required a larger workforce and, as in the 1950s, people from other countries were considered a good source of new labour.
In any case, the government predicted that EU enlargement would only cause a rise of up to 13,000 people a year in immigration.
In the event, more than a million people from these countries arrived and stayed over the next decade. It was one of the biggest influxes in British history.
Since 2016, the year of the Brexit referendum, EU immigration has fallen - although more EU citizens still arrive in the UK than leave.
The current government plans to end the free movement of EU citizens to the UK once the Brexit transition period ends.
In the meantime, however, immigration from other parts of the world has increased to fill the gap. Despite government targets to reduce net migration to the "tens of thousands", the UK's net migration figures remain historically high in the context of the past century.
You can download the whole of the BBC Briefing on immigration here.
About this piece
This analysis piece was commissioned by the BBC from an expert working for an outside organisation.
Keith Lowe is a historian, and author of several books on social change in post-war Europe.
Edited by Eleanor Lawrie