Pope Francis said Republican presidential candidate Donald Trump is "not Christian" because of his views on immigration Feb. 18. Pope Francis was speaking to reporters on his way back to Rome from Mexico. (Reuters)

Following Pope Francis's comment suggesting that Donald Trump was "not Christian" because of his advocacy for a border wall to keep out undocumented immigrants, a Vatican spokesman said it was not a personal attack on the Republican presidential front-runner.

Vatican spokesman Father Federico Lombardi told Vatican Radio on Friday that the pope's words were merely meant to express his own views that migrants should not be kept behind walls.

"It is not that the pope wishes to be, in any way, a personal attack nor an indication of voting," Lombardi said, according to a translation from the Vatican press office.

Francis was responding to a reporter's question Thursday about Trump's declaration that he would deport millions of undocumented immigrants and build a wall along the border between Mexico and the United States.

“A person who thinks only about building walls — wherever they may be — and not building bridges, is not Christian,” he said, according to a translation from the Associated Press. "This is not in the Gospel."

"I'd just say that this man is not Christian if he said it this way," he added.

Lombardi said the pope believes people "should not build walls, but bridges" — which is "very consistent with what is a courageous following of the gospel of welcome and solidarity."

Trump first called the pope's statement "disgraceful," saying that, as president, "I will not allow Christianity to be consistently attacked and weakened."

He later told ABC's "Good Morning America" that after reading the pope's comment, he realized it was "a little bit lighter" than how it had been portrayed.

At a rally Friday afternoon in Myrtle Beach, S.C., Trump continued to make his point, shouting: "We're going to build a wall! We're going to build a wall!"

He twice asked the crowd who would pay for it. "Mexico!" they answered.

Trump also praised the Vatican for clarifying the pope's comment.

"So, you know, Mexico, we had a little thing yesterday — the pope is great," he said. "He made a beautiful statement this morning.

"They had him convinced that illegal immigration is like a wonderful thing — not a wonderful thing for us. It's wonderful for Mexico."

Then he transitioned into discussing his "phenomenal relationship" with Hispanics — and how that will translate into votes.

[This story has been updated.]