Former President Barack Obama on Thursday took a thinly-veiled shot at his successor for wanting to build a wall along the U.S.-Mexico border.

“We have to recognize that everything that happens on the other side of the world affects us as well," he said in Berlin during a conversation with German Chancellor Angela Merkel. "If there’s conflict, if there's bad governance, if there’s war, if there’s poverty, in this new world that we live in we can’t isolate ourselves. We can’t hide behind a wall."

Obama emphasized the importance of giving humanitarian aid and taking in refugees and immigrants in need.

“In the eyes of God, a child on the other side of the border is no less worthy of love and compassion than my own child,” he said.

On "The Five" tonight, Greg Gutfeld said Obama is deliberately misrepresenting the issue, since the border wall would be for protection, not hiding.

"If a wall implies you're a coward, President Obama should live on the street. Prove that we don't need walls," Gutfeld said. "Walls are the most practical thing on the planet. They protect you."

Richard Fowler argued that a border wall is not cost-effective, and it's "rather stupid."

"This argument that all these terrorists are running across the Mexican border is absurd," Fowler said.

Jesse Watters pointed out that it's not just about terrorists, as MS-13 gang members and drug traffickers are able to cross the border.

"There's a lot of dangerous people coming across," Watters said, adding that illegal immigrants are also stealing jobs from Americans.

Watch more above.

GA Veteran Gets Letter of 'Violation' for Flying Flag Outside Home

Former Army Ranger: Celebs' Reactions to Manchester Show Their 'Bulletproof Bubble'

Trish Regan to Former Hillary Spox: Obama Policies Led to Rise of ISIS

'The View' Bashes Trump as Unpresidential for Calling Terrorists 'Evil Losers'