At least 3.9 million unauthorised migrants - and possibly as many as 4.8 million - lived in Europe in 2017 with half of them in Germany and the United Kingdom, a new study has revealed.

The Pew Research Center said the number grew from 2014, when about 3 - 3.7 million resided in Europe, and peaked in 2015-16 during the refugee crisis when some 1.3 million people arrived, mostly from war-torn countries such as Syria, Iraq and Afghanistan.

In 2016, an estimated 4.1 - 5.3 million unauthorised migrants lived in Europe.

At least 3.9 million unauthorised migrants - and possibly as many as 4.8 million - lived in Europe in 2017 with half of them in Germany and the United Kingdom, a new study has revealed (file picture shows a migrant child in Germany in 2016)

That's the year central European countries closed the Balkans route that many migrants used to get to northern Europe.

Also, the European Union and Turkey signed a deal designed to keep millions of migrants in Turkey from coming to Europe, and many asylum seekers, especially Syrians, received asylum or residency rights in Germany and other European countries. All this led to a decrease in the number of unauthorised migrants by 2017.

The findings are based on the latest available data from all 28 EU member states as well as Norway, Switzerland, Iceland and Liechtenstein.

Even with the growth of migration to Europe, unauthorised migrants accounted for less than one per cent of the continent's total population of more than 500 million in 2017.

That's less than half the percentage for the United States, which in 2017 had an estimated 10.3 - 10.7 million unauthorised immigrants - or three per cent of a population of 325 million.

The Washington DC-based Pew Research Center defines unauthorised migrants as people living in a country without citizenship and without residency permits. The centre also includes asylum seekers with a pending decision on their asylum request as unauthorised because asylum rejection rates are high.

Also, children born to unauthorised migrants in Europe are considered unauthorised themselves because most European countries do not have birthright citizenship.

The findings are based on the latest available data from all 28 EU member states as well as Norway, Switzerland, Iceland and Liechtenstein. Pictured: Migrants walk towards a reception facility after crossing from Croatia, near a border crossing between Croatia and Slovenia in October 2015

In the US everybody born in the country is an American citizen, regardless of their parents' immigration status.

'The surge of asylum seekers contributed to a higher number of unauthorised immigrants in many European countries,' said senior researcher Phillip Connor.

'But unauthorised immigrants also include those who overstayed a visa or entered Europe illegally, many of whom migrated years ago.'

While in the United States most unauthorised immigrants come from the Americas with about half from Mexico alone, their background is more diverse in Europe: Three in 10 were from the Asia-Pacific region including Afghanistan and Pakistan, about 23 per cent were from European countries outside those studied in the poll as well as Russia and Turkey, 21 per cent from the Middle East and North Africa, 17 per cent from sub-Saharan Africa and eight per cent from the Americas.

Beyond Germany and the UK, where about half of Europe's unauthorised migrants lived, substantial numbers also resided in Italy and France. Together, these four countries were home to 70 per cent of all unauthorised migrants in Europe.

Between 1 - 1.2 million unauthorised migrants were estimated to live in Germany in 2017.

A large number of them were asylum seekers who arrived between 2015-16 and were waiting for a ruling on their asylum request.

Roughly the same number - 800,000 to 1.2 million - lived in the UK; 500,000 - 700,000 were in Italy and 300,000 - 400,000 in France.