Pope Francis said on Sunday that political leaders who want walls and other barriers to keep migrants out "will end up becoming prisoners of the walls they build.

The pope made his comments to reporters aboard the plane returning from Morocco in response to a question about migration in general and about U.S. President Donald Trump's threat to shut down the southern border with Mexico.

"Builders of walls, be they made of razor wire or bricks, will end up becoming prisoners of the walls they build," he said.