Pope Francis injected himself into the U.S. presidential race Thursday, suggesting Republican front-runner Donald Trump "is not Christian" because of his proposal to build a massive wall on the southern U.S. border with Mexico to keep out migrants headed to the United States.

The pontiff offered his comments on his flight back to Rome after a visit this week to Mexico, where he celebrated Mass in an outdoor plaza Wednesday just a few hundred meters across the border from the U.S. state of Texas, the destination of many migrants coming from Mexico and Central America.

"A person who thinks only about building walls, wherever they may be, and not building bridges, is not Christian," Francis said. "This is not in the Gospel."

The pope said he would "give [Trump] the benefit of the doubt" because he had not heard independently of Trump's wall-building plans, a staple in the Republican candidate's campaign speeches.

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

Trump, a Presbyterian, said at a campaign rally in the Atlantic coastal state of South Carolina that the pontiff's comments were "not a nice thing to say." He said the pope questioning his faith is "disgraceful."

Trump, a billionaire real estate mogul, said that if Islamic State terrorists ever attack the Vatican, the seat of the papacy "can only hope that Donald Trump" is the U.S. president to respond to them, instead of what he claimed are Washington's current "no action" leaders.

Republican presidential candidate Donald Trump spe
Republican presidential candidate Donald Trump speaks during a campaign stop in Kiawah Island, South Carolina, Feb. 18, 2016.

President Barack Obama, in the last year and a half, has led a coalition of more than 60 countries in launching more than 10,000 airstrikes against Islamic State targets in Iraq and Syria, with the U.S. conducting most of the attacks.  But Trump and other Republican presidential contenders have said they would, if elected, conduct a more robust campaign against the insurgents in the Mideast.
The pope's comments came two days ahead of a crucial party nominating contest in South Carolina, where political surveys show Trump with a commanding lead over five Republican challengers.

In the latest survey, Fox News said Thursday that Trump is favored by 32 percent of Republicans in the state, leading Texas Senator Ted Cruz with 19 percent and Florida Senator Marco Rubio at 15 percent. Other polls show Trump with an even bigger lead. Former Florida Governor Jeb Bush, the son and brother of two U.S. presidents, Ohio Governor John Kasich and retired neurosurgeon Ben Carson were further back in the Fox poll.

The Republican candidates are continuing to trade pointed barbs with each other, with some attacking Trump and others aiming their verbal attacks at their opponents closer to them in the polls, in hopes of winning enough support in South Carolina to have a credible standing as the contest heads to numerous other states in the next month.

Rubio accused the Cruz campaign creating a fake photo of him shaking hands with Obama, with both of them smiling and both using their left hands, which would be opposite the normal right hand greeting in the U.S. The ad, produced by a Cruz website, said that "Rubio is the Republican Obama."

South Carolina's Republican governor, Nikki Haley, on Wednesday endorsed Rubio for the party's presidential nomination, an endorsement Bush had also actively sought. Haley, with wide support in the state, campaigned with Rubio on Thursday.