A spokesman for Pope Francis insisted Friday the pontiff was "in no way" launching an attack on Donald Trump, a U.S. presidential candidate, nor was he trying to sway voters by declaring someone who advocates building walls isn't Christian.

The Rev. Federico Lombardi, in an interview on Vatican Radio, stressed that Francis often speaks about building bridges, not walls, and that his remark on Thursday wasn't "a personal attack" on the business mogul.

Flying back to Rome from a pilgrimage that included Mass at the Mexican side of the border with the United States, Francis, answering a reporter's question, had said that a person who advocates building walls is "not Christian."

Trump, who has repeatedly called for a wall to divide the U.S. and Mexico while campaigning for November's election, quickly retorted it was "disgraceful" to question a person's faith.

On Friday, Lombardi sought to put the pope's comments in context, saying they were "in no way a personal attack or an indication on how to vote." The radio interviewer told Lombardi that many have seen the comment as a kind of "excommunication, if we can call it that," of Trump.

"But the pope said what we well know, when we follow his teaching and his positions: that one mustn't build walls, but bridges," Lombardi said.

See the Fox News 2016 battleground prediction map and make your own election projections. See Predictions Map →

"He has always said this, continuously. And he has said it also about migration issues in Europe, very many times. Thus, it's not at all a specific question, limited to this case," the spokesman said.

Trump appeared pleased with the comments, referencing them at a campaign rally Friday.

"Yesterday, the pope was great," Trump told an audience in Myrtle Beach, South Carolina, where he is campaigning. "He made a beautiful statement this morning. They had him convinced that illegal immigration was like a wonderful thing. Not wonderful for us. It's wonderful for Mexico."

Some European countries have erected fences or raised the possibility of building fences and other barriers on their borders after hundreds of thousands of asylum-seekers reached the continent by sea and land, fleeing war or poverty.

"The pope said clearly that he wasn't stepping into voting issues in the electoral campaign in the United States," Lombardi added. He said the pope was also "giving the benefit of the doubt" on what Trump had said.

Trump alluded to this context as he softened his rhetoric about the pope, saying at a town hall event on CNN that he believes Francis' remarks were "probably a little bit nicer" than first reported.