Pope Francis, who has rebuked President Donald Trump for his hardline immigration stance, revealed this weekend that he’s donated $500,000 in aid to migrants in Mexico who have sought a “better future in the United States” but have found the U.S. border “closed to them.”

The Vatican said on Saturday that the Catholic leader’s donation — taken from the coffers of Peter’s Pence, the pope’s charitable fund — would be distributed to 27 projects across Mexico and would be used to provide housing, food and other necessities to Central American migrants fleeing poverty and violence.

Many of these migrants, often accompanied by young children, have traveled thousands of miles “on foot and with makeshift vehicles from Honduras, El Salvador and Guatemala,” the Vatican said in a press release.

“In 2018, six migrant caravans entered Mexico, for a total of 75,000 people ... All these people were stranded, unable to enter the United States, without a home or livelihood,” the release said.

Media coverage of the migrant crisis has been on the decline, the Vatican said, resulting in a concomitant decrease in aid for those who left their strife-torn countries for the U.S. but have been stranded in Mexico. This decline prompted the pope to act.

Francis’ donation comes less than a month after he criticized Trump and other “builders of walls” who want to keep migrants out of their countries.

“Builders of walls, be they made of razor wire or bricks, will end up becoming prisoners of the walls they build,” the pope told reporters on March 31 when asked to comment on a threat Trump had issued about closing the U.S.-Mexico border.

“I realize that with this problem [of migration], a government has a hot potato in its hands, but it must be resolved differently, humanely, not with razor wire,” Francis said.

In 2016, the pope suggested that Trump’s desire to keep migrants out of America was un-Christian.