In what can only be described as a watershed moment in Pope Francis’s teaching on immigration, the pontiff has offered his most sophisticated and refined observations on the topic to-date, making a number of key distinctions and furnishing a helpful guide for practical decision-making.

Oddly, the pope made this lucid statement where one would least expect it: in his extemporaneous remarks aboard the flight home from Sweden Tuesday.

Until now, the pope’s comments on immigration have frequently generated more heat than light, coming across as neatly packaged slogans difficult to translate into realizable political action. Hence, statements that “we are all migrants,” that hospitality to refugees is “our greatest security” against terrorism, that it is “hypocritical to call oneself a Christian and send away a refugee,” that “migrants are not a danger,” or begging forgiveness from migrants for “our closed-mindedness and indifference” can all end up sounding like open-borders idealism.

Enter Tuesday’s presser. When asked about Europe’s migrant crisis, Francis showed an unprecedented level of realism and nuance that left observers speaking of a veritable “turning point” in the pope’s thought.

Distinction between migrants and refugees

In his response, the pope began by insisting on the importance of distinguishing between migrants and refugees, suggesting that they represent very different problems.

“Migrants should be treated according to certain rules, because migration is a right, but one which is highly regulated,” he said. “On the other hand, to be a refugee means coming from a terrible situation of war, anguish, hunger and the status of a refugee requires more care, more work.”

This key distinction comes hard on the heels of complaints that many migrants come to Europe to take advantage of its wide-ranging social welfare benefits.

For example, Professor Anna Bono, who teaches African History and Institutions at the University of Turin, has suggested that most of the migrants coming to Italy are not refugees escaping from war or even poor people fleeing hunger, but young, middle-class males looking for a better life.

The professor also said that traffickers in African countries have vigorously promoted emigration to Italy through extensive propaganda campaigns.

“In the countries of sub-Saharan Africa there are advertisements inciting people to go to Italy, explaining that everything here is free. And indeed it is,” she said.

Welcome v. integration

The pope went to great lengths to distinguish between a simple open door and a nation’s ability to integrate new members into society. In this vein Francis praised his host country of Sweden for its “long tradition of welcoming” united to the ability to “integrate” new citizens.

This integration, or “assimilation,” requires a number of practical measures, he said, such as being able to quickly find “a house, school, and employment” for newcomers.

In point of fact, however, Sweden now finds itself swamped with so many migrants that it is completely unable to “integrate” them, according to these benchmarks. Regarding employment, for instance, in 2015 Sweden received a record 163,000 asylum-seekers, yet as of this past summer, fewer than 500 had found jobs and were paying taxes, meaning that the vast majority depend on taxpayer-funded welfare assistance for their sustenance.

This situation is economically unsustainable.

Francis is no doubt aware of this problem. During the press conference, he spoke of having met with an unnamed Swedish government official who informed him of Sweden’s inability to integrate the large numbers of foreigners arriving into the country.

He spoke to me of troubles they are having, Francis said, “because so many of them are coming that there isn’t time to settle them, find school, lodging, work, learn the language.”

The danger of “ghettoization”

As a closely related corollary, Francis went on to speak of the risks involved when immigrants fail to be integrated into society.

The primary one, he suggested, was the tendency of unassimilated immigrants to move into “ghettos”—subcultures where foreigners continue to speak their native tongue and follow the customs of their country of origin rather than learning to adopt the ways of their new homeland.

“What is the danger when a refugee or migrant is not integrated?” Francis asked. “He is ghettoized, that is, he enters a ghetto. And a culture that does not develop in relation with another culture, that is dangerous,” he said.

The pope was likely referring to a problem in Sweden due to rising numbers of mostly Islamic immigrants, which has resulted in the development of Muslim-controlled “no-go zones” where law enforcement fears to enter.

It is just these sort of ghettoes—for example, on the outskirts of Brussels and Paris—that have been the breeding ground for Islamic terrorist attacks in the past two years.

Open hearts and political prudence

The pope built on these points to offer yet another key distinction, the difference between open hearts and political prudence. One thing is the attitude of openness and welcome that we are all bound to foster, another thing is the political realism that must be exercised for the good of society.

In this regard the pope even made allowances for European politicians who have completely closed their borders to immigrants, saying that politicians have a right to exercise prudence in such decisions.

“So what do I think of those who close their borders?” Francis asked. “I think that in theory no one should close their heart to a refugee, but those who govern must also exercise prudence. They should be very open to receiving them, but they should also calculate how they will be able to settle them, because a refugee must not only be welcomed, but also integrated.”

“And if a country is only able to integrate 20, let’s say, then it should only accept that many. If another is able to do more, let it do more,” he said.

“But always with an open heart,” he continued. “It isn’t human to close one’s doors, one’s heart, and in the long run you pay for it. Here, you pay for it politically, just as you can pay politically for imprudence in your calculations, by taking in more than you can possibly assimilate.”

Stemming immigration is not always selfish

Listening to a number of the pope’s declarations regarding migrants and refugees, one could easily get the impression that he believes that the only reason nations would resist massive immigration is out of selfishness. In his in-flight presser, however, he made it clear that such is not the case.

Once again the pontiff used Sweden as an example, after having established its credentials as an open, welcoming country.

If Sweden were to stop taking in so many migrants it will not be “out of selfishness,” Francis said, but out of prudence. “Today many look to Sweden because they know how welcoming it is, but there just isn’t time to settle them all,” he said.

For many, the pope’s words on immigration will be a welcome sign of encouragement. They indicate both that his thought is more nuanced than often comes across and that he is willing to learn from the experience of those on the ground.

For people dealing with the difficult reality of mass migration, that is good news indeed.

Thomas D. Williams is a Rome-based Catholic theologian, author and professor of Ethics at the University of Saint Thomas. His fifteen books include The World as It Could Be: Catholic Social Thought for a New Generation (Crossroad) and Who Is My Neighbor? Personalism and the Foundations of Human Rights (CUA Press).