Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

VATICAN CITY — A spokesman for Pope Francis insisted Friday the pontiff was "in no way" launching an attack on Donald Trump 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 running for the Republican presidential nomination.

Related: Trump Joins List of Politicians Who Have Tangled With Religious Leaders

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.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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.

"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.

Related: Pope Francis to Donald Trump: Building Mexico Wall Is 'Not Christian'

"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.