When I first worked on migration issues in the Cabinet Office at the turn of the millennium, a letter crossed my desk from the then leader of Kent county council, complaining about the number of asylum seekers, and mentioning that Kent had “no prior history of multicultural diversity”. In fact, Dover was represented in parliament by Thomas Papillon, a Huguenot refugee, in the 17th century.

This historical amnesia seems all-pervasive when it comes to political debate in the UK. How many times have we heard politicians or the press complain that “we can’t talk about immigration”, when it has been a controversial political issue for more than a century, from the Aliens Act 1905 to Enoch Powell’s “rivers of blood” speech to the Brexit referendum?

It is that amnesia – the idea that, unlike the US, Europe is not a continent of immigration, and so any new flows of people are a temporary, and generally unwelcome, phenomenon – that Peter Gatrell sets out to confront in his timely and ambitious new book, The Unsettling of Europe.

Immigration, if not ignored entirely, is often compartmentalised in most histories of Europe or its constituent countries. Gatrell frames it as central to the continent’s postwar development, both economic and social, beginning with the huge forced relocations and refugee flows that followed the second world war, running through the postcolonial labour migrations that fuelled Europe’s economic renaissance, to the wars and crises in “peripheral Europe” and Europe’s “near abroad” that have been in the spotlight in recent years.

Perhaps the most striking chapter – because it’s least familiar – is the one that deals with the first of these, which Gatrell describes as “violent peacetime”, with 17 million people on the move. The horror of the Red Army’s occupation of Germany is well known, even if the vast numbers never fail to shock, but other countries seized the opportunity, too. Churchill spoke of the need for a “clean sweep” of Germans in Poland. Communists (Gomułka in Poland) and democrats (Beneš in Czechoslovakia) agreed on the need to “liquidate the German problem”. Gatrell makes a strong, if largely implicit, case that this ethnic cleansing in a drive to create homogeneous states is the original sin that underlies the virulent nationalist populism now afflicting much of central and Eastern Europe.

Churchill wanted to fight the 1955 election with the slogan 'Keep England White'

The story of labour migration to the former imperial powers, including the UK, as well as of Turks to Germany, is much better known. But Gatrell also highlights other episodes, where decolonisation and its accompanying upheavals led to refugees moving to or “returning” to the mother country – Moluccans who came to the Netherlands, the harkis and pieds-noirs who fled Algeria after independence. Not least, the East African Asians, whose presence in Africa was the direct result of the complex economic relations between the different constituent parts of the British empire, a fact many British politicians would rather have forgotten.

And while other accounts often suggest that European countries acquired large non-white populations by accident, as a byproduct of labour migration that was always intended to be temporary, he notes that, long before Powell’s speech, politicians worried about the threat immigration posed to ethnic and religious homogeneity. Churchill wanted to fight the 1955 election with the slogan “Keep England White”, while De Gaulle famously worried that his home village would have to be renamed “Colombey-les-deux-Mosquées”.

One strength of the book is its focus on the stories of individual migrants, the communities in which they arrived, and their continued connections, at least in some cases, with their countries of origin. From an ethnic German who moved from Kazakhstan to Hamburg, to an Iranian anthropologist now living in Sweden, we get at least a glimpse of the complexity of the topic.

Gatrell’s nuanced and sympathetic treatment of the variety of the immigrant experience – and its impact on European societies – can also be seen as a rejoinder to two recent, well-publicised books. As HL Mencken wrote: “for every complex problem there is an answer that is clear, simple and wrong.” Douglas Murray, author of The Strange Death of Europe, an extended mixture of conspiracy theory and bigotry, wants some version of Trump’s ban on Muslim immigration. Eric Kaufmann’s Whiteshift argues for ethnic – that is, white – preference in immigration policies to preserve a supposedly threatened “white identity”.

Gatrell, however, offers no such simplicities. He recognises – as the title makes clear – that migration can be unsettling, both for migrants and the societies where they arrive. Walls and fences – real and metaphorical – can avert this, at least in part, but there are costs. Without postwar migration, “the continent as a whole would have been much impoverished – less unsettled, perhaps, but greatly diminished”. He does not conceal his disappointment with the short-sighted and inhumane response of most European countries to the migrant crisis of 2015: “the default position was deterrence, detention and deportation”.

But what should that mean for the future? There are no easy answers, and The Unsettling of Europe certainly does not offer any. Here in the UK, however, there are some grounds for optimism. The political upheavals sparked by Brexit – itself caused in large part by public attitudes to immigration – offer a window of opportunity to reset not just immigration policy but our broader perspective. This will take a degree of courage and initiative, not just from politicians, but from the rest of us. As Gatrell shows us, it will be contested, messy and imperfect, just as in every previous historical episode; but, as he also demonstrates, it can also enrich us.

Jonathan Portes is professor of economics and public policy at King’s College London and the author of What Do We Know and What Should We Do About Immigration? (Sage)

• The Unsettling of Europe is published by Allen Lane (£30). To order a copy go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £15, online orders only. Phone orders min p&p of £1.99