The Vatican responded late Tuesday to Republican presidential candidate Donald Trump's criticism of Pope Francis' plan to visit the border wall that separates Mexico from the U.S.

The pope is scheduled to visit the fence between the border cities of Ciudad Juarez, Mexico and El Paso, Texas Wednesday. He is expected to stop at the fence, give a blessing in honor of asylum-seekers on the other side and pray for those who died trying to get there.

In an interview with Fox Business Network last week, Trump said that he did not believe Francis understood what he called "the danger of the open border we have with Mexico."

"I think Mexico got him to [visit the border] because Mexico wants to keep the border just the way it is because they’re making a fortune and we’re losing," Trump added.

In a statement, Vatican spokesman the Rev. Federico Lombardi said, "The pope always talks about migration problems all around the world, of the duties we have to solve these problems in a humane manner, of hosting those who come from other countries in search of a life of dignity and peace."

Immigration is a theme close to the pontiff's heart. He has demanded that countries welcome those fleeing poverty and oppression and denounced what he calls the "globalization of indifference" toward refugees.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

The pontiff touched on the issue in his address to Congress this past September, when he urged lawmakers not to be “fearful of foreigners” and reminded them that many are “descended from immigrants.”

It's a message that hasn't gone down well with some in the U.S., at a time when border apprehensions of families and unaccompanied minors rose significantly in the last three months of 2015.

Trump has repeatedly vowed to build a wall along the entire border with Mexico – and make Mexico pay for it. All along, he's made combating illegal immigration a centerpiece of his presidential campaign, claiming credit for kickstarting the debate which now features heavily in the GOP primary race.

The Associated Press contributed to this report.