Despite his dislike of walls, Pope Francis declared Friday that “every country has the right to control its borders,” especially where the risk of terrorism exists.

In an extended interview with the leftist Spanish newspaper El País, the Pope reaffirmed basic Catholic doctrine regarding immigration, namely, that sovereign nations have the fundamental right to maintain secure borders and to receive immigrants in an orderly and controlled fashion.

“Yes, every country has the right to control its borders, who comes and who goes,” Francis said Friday, “and those countries at risk —from terrorism or such things— have even more right to control them more.”

The one qualification to this right, the pontiff continued, is that “no country has the right to deprive its citizens of the possibility to talk with their neighbors,” as often has occurred in the case of totalitarian states such as East Germany and the U.S.S.R.

Over and over again the Pope has made it clear that he does not believe in illegal immigration, and that states must maintain secure borders for the safety of their citizens. At the same time, he has often insisted that individuals as well as nations should keep their hearts open to people who migrate from their homelands in search of a better life.

In Friday’s interview, Francis stated that “each immigrant constitutes a very serious problem,” since they are often “fleeing their country, because of hunger or because of war.” Often, too, they are “exploited,” he added, citing Africa as an example of where this often occurs.

The pontiff praised the examples of Italy and Greece, holding them up as models of welcoming migrants. “Even now, Italy, with all the problems caused by the earthquake and all that, still cares for them. They welcome them,” he said.

As he has done on other occasions, the Pope also highlighted the problem of integration, that is, the possibility of successfully assimilating immigrants into the existing culture.

“Where there is no integration,” Francis said, immigrants become “ghettoized,” and do not become part of the culture of their host country.

As an example of this, Francis said that the perpetrators of “the atrocity in Zaventem,” the Belgian airport, “lived in an immigrant neighborhood, a closed neighborhood.”

Last fall, he warned nations that they should not be taking in more immigrants and refugees than they can reasonably assimilate.

As models of successful integration of migrants, Francis held up Sweden and the Catholic community of Sant’Egidio in Italy.

In his interview, the Pope once more underscored the right of Catholics and others to contradict him.

“They have the right to disagree,” he said. “They have the right to think that the path is dangerous, that the outcome may be bad, they have that right.”

At the same time, Francis said that such opposition should be carried out openly, and not in secret.

“Hiding behind others is inhumane, it is a crime,” he said. “Everyone has the right to debate, and I wish we all would debate more, because it creates a smoother connection between us. Debate unites us.”

Follow Thomas D. Williams on Twitter Follow @tdwilliamsrome