U.S. Republican presidential candidate Donald Trump is "not Christian" because of his views on immigration, Pope Francis said on his way back to Rome from Mexico.

The pope said, however, he did not want to advise American Catholics on whether or not to vote for Trump.

In a freewheeling conversation with reporters on his flight back from a visit to Mexico, Francis was asked about Trump and some of his statements, such as vowing to build a wall between the United States and Mexico if he becomes president.

"A person who thinks only about building walls, wherever they may be, and not building bridges, is not Christian," Francis said in answer to a specific question about Trump's views. "This is not in the gospel."

RELATED: Republican presidential race erupts into personal attacks

Asked if American Catholics should vote for someone with Trump's views, Francis said:

"I am not going to get involved in that. I say only that this man is not Christian if he has said things like that. We must see if he said things in that way and in this I give the benefit of the doubt," he said.

On his last day in Mexico, Francis said a Mass on the U.S. border, where he railed against immigration policies that force many underground and into the hands of drug gangs and human smugglers.

Trump has also said he would deport millions of illegal migrants if he wins the November U.S. election. Last week he told Fox Business television that Pope Francis did not understand the Mexican border issues.

RELATED: Pope denounces harsh immigration policies at Mexio-U.S. border

"The pope is a very political person. I think he doesn't understand the problems our country has. I don't think he understands the danger of the open border that we have with Mexico," he said.

Asked about being called a "political person", Francis said: "Thank God he said I was a politician because Aristotle defined the human person as 'animal politicus'. So at least I am a human person."

Trump has taken a more than 20-point lead over U.S. Senator Ted Cruz in the Republican race for the presidential nomination, with his campaign seeming to thrive off the endless controversies that he has generated.

TRUMP RESPONDS

Republican presidential candidate Donald Trump, responding to Pope Francis' calling him "not Christian" because of his positions on immigration, said on Thursday the pope would have wished Trump was president if Islamic State attacked Vatican.

"If and when the Vatican is attacked by the ISIS, which as everyone knows is ISIS's ultimate trophy, I can promise you that the pope would have only wished and prayed that Donald Trump would have been president," Trump said in a speech in South Carolina, using an acronym for the militant group.