In questions to both leaders on the refugee crisis, Obama said nation states had a duty to help people in need but also to make clear to their own populations the interconnected nature of the world.

“One way we can do a better job is to create more opportunities for people in their home countries,” he said. “When we provide development aid to Africa or we are involved in conflict resolution in areas where war has been taking place, we make investments to try to deal with climate change … Those things we do not do just for charity, not just because they are the right thing to do.

“If there are disruptions in these countries, if there is bad governance, if there is war or if there is poverty, in this new world that we live in we can’t isolate ourselves: we can’t hide behind a wall.”