Pope Francis has urged countries not to take in more migrants than they can 'assimilate' saying it could lead to ghettoization.

The Pontiff had been had been on a visit to Sweden, which has welcomed 245,000 refugees in 2015, to mark the 500th anniversary of the Protestant Reformation.

But on the flight back to Rome, he held an impromptu press conference where he was asked about the European migrant crisis.

Pope Francis talk to reporters on a flight back from Sweden to Rome. He has rged countries not to take in more migrants than they can 'assimilate' saying it could lead to ghettoization

And he said that even though countries shouldn't 'close their hearts' to refugees, they do have the right to assess their capacity to effectively integrate them into society.

He told reporters: 'Governments must be open to receive them, but also do the calculations regarding their reception (capabilities), because one must not only receive a refugee but also integrate them.

'Because so many are arriving That there is no time to make provision for them and that they can find schools, homes, employment, and learn the language. Prudence has to make this calculation.'

Despite the comments, Francis also added there was political gains to welcoming refugees saying humans should close their doors or hearts

Later Francis also warned of the dangers of migrants not integrating saying it could pose a 'dangerous' situation.

He added: 'What is the danger when a refugee or migrant is not integrated? He is ghettoized, that is, he enters a ghetto. And a culture that does not develop in relation with another culture, that is dangerous.'

However, despite the comments, he also added there was political gains to welcoming refugees saying humans shouldn't close their doors.

The Pope's comments come as Europe saw an influx of more than one million asylum seekers last year in the worst such crisis since World War II.

However, it is not the first time he has spoken out about the crisis, saying solving it is a priority of his pontifficate.

His first trip outside Rome as Pope was to the island of Lampedusa, destination for migrants smuggled from Libya.

He also prayed at the U.S.-Mexico border and said anyone who wants to build a wall there isn't Christian.

The Pontiff greats the faithful at a mass in Sweden. He has regularly talked about the migrant crisis in the past

And most recently, he brought a dozen Syrian refugees home with him when he visited the hard-hit Greek island of Lesbos to show solidarity with new arrivals.

Meanwhile Francis has also assumed direct responsibility for migrant issues in a new Vatican department that merges four offices into one handling peace, the environment and human trafficking.