Obama, speaking alongside German Chancellor Angela Merkel in Berlin, began by listing the many things developed nations do to help poor countries, including providing aid and conflict resolution throughout the world.

“Those things we do not just for charity, not just because they’re the right thing to do or out of kindness, but also because if there are disruptions in these countries, 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,” he said before taking the apparent shot at Trump.

“We can’t hide behind a wall,” he said, seemingly in reference to Trump’s plan to build a wall along the Mexican border. “And I think it is very important for us to see those investments as part of our own wellbeing as well as to the benefit of others.”