Figure is down from 2016 peak and UK and Germany account for about half of total

Europe was home to between 3.9 million and 4.8 million unauthorised immigrants in 2017, about half of whom lived in the UK and Germany, according to the first comprehensive estimate in more than a decade.

The Pew Research Center study, based on data from the 32 EU and Efta member states and international organisations, found the range was significantly higher than in 2014 (3 million to 3.7 million) but had fallen slightly since a 2016 peak of 4.1 million to 5.3 million.

The study also found that unauthorised immigrants in Europe came from many different countries, had arrived relatively recently and were mostly young and male.

Andrew Geddes, the director of the Migration Policy Centre at the European University Institute in Florence, said the study presented a “rigorous, robust and credible” picture of an issue that many Europeans had “lost trust and confidence in the capacity of their governments – and the EU – to deal with competently”.

Victoria Rietig, of the German Council on Foreign Relations, said there was agreement in Germany that unauthorised immigration was “bad for security, bad for the people concerned who live in the shadows, bad for social cohesion,” but that the debate had become “toxic and increasingly ideological”.

The study found that Germany, the UK, Italy and France, which between them represent about 50% of Europe’s total population of 500 million people, accounted for roughly 70% of unauthorised immigrants, with Germany and the UK alone accounting for about half.

Between 1 million and 1.2 million unauthorised migrants were living in Germany in 2017, the study’s authors said, roughly double the number in 2014 but slightly down on 2016. Another 800,000 to 1.2 million were settled in the UK, 500,000 to 700,000 in Italy and 300,000 to 400,000 in France.

The study found that in Germany the ratio of authorised to unauthorised immigrants roughly reflected the European average of four to one, while in the UK the ratio was closer to one to one, meaning there were almost as many unauthorised immigrants as authorised. In Italy and France, authorised immigrants outnumbered unauthorised by between six and nine to one.

The number of unauthorised immigrants in Germany almost doubled between 2014 and 2016, while in the UK the total barely changed. The report’s authors said most of the UK’s unauthorised immigrants were “likely to be people who have overstayed their visas, or asylum seekers who have remained in the UK after not seeing their cases approved”.

The other 28 EU/Efta countries accounted for a total of between 1.2 million and 1.4 million unauthorised immigrants, the study found, with many having fewer than 100,000 and several – including Austria, the Czech Republic, Greece, Spain and Switzerland – having between 100,000 and 200,000.

Just under a third of unauthorised immigrants in Europe in 2017 came from Asia Pacific countries including Afghanistan and Pakistan, 23% came from European non-EU/Efta countries such as Russia and Turkey, 21% came from the Middle East and north Africa, including Syria and Iraq, and 17% came from sub-Saharan Africa, including Nigeria and Eritrea. In the UK, 52% were from the Asia Pacific region.

Across the 32 states, 56% of all unauthorised immigrants had lived in their country of residence for less than five years and 16% for between five and nine years, the study found. In Germany, 66% had arrived since 2014, while in the UK nearly six in 10 had been in the country for five years or longer.

Just over half were male and 65% were younger than 35, the study found.

The report noted that unauthorised immigrants made up less than 1% of Europe’s total population in 2017.

The study defined unauthorised immigrants as non-citizens of EU/Efta states living in the bloc without a residence permit, including people who had arrived without authorisation, overstayed their visa or stayed when told to leave.

The children of unauthorised immigrants were counted in the estimates, as were people with pending asylum applications whose future in Europe was uncertain. Most of these had arrived without permission, and a majority of claims were now being rejected, the report said.

Experts say public attitudes towards immigration are becoming more nuanced, even in countries where populist far-right parties are in government or challenging for power.

Geddes said that in most European countries people now recognised that immigration was “a complex subject with complex trade-offs – it’s not a binary question of open or closed”. A 2018 Pew survey found majorities in several countries backed deporting unauthorised immigrants but also supported taking in refugees fleeing war and violence, many of whom arrive without authorisation.