Former President Barack Obama subtly knocked his successor, President Donald Trump on Thursday, while explaining the importance of 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 in Berlin during a conversation with German Chancellor Angela Merkel.

Explaining the importance of humanitarian aid, Obama said that, “we have to recognize that everything that happens on the other side of the world affects us as well.... if there’s conflict, if there’s war, if there’s poverty, we can’t isolate ourselves, we can’t hide behind the wall.”

Other topics that that came up at Thursday’s event were defense spending, religion, and education― all issues that Trump and Obama tend to disagree on.

Contending that poor education policies breed inequality, Obama said that, “no county will be successful if it leaves half of its children... uneducated and on the sidelines. We have to think of them as all of our children. If Malia and Sasha are doing well but the majority of their peers are not, that’s gonna affect their lives in some damaging way.”

“The good news is that we know what to do, the bad news is that we haven’t convinced everybody of the necessity of doing it,” he added.

Obama is extremely popular in Germany, and his appearance was greeted with a massive crowd and repeated applause. Trump, on the other hand, has clashed with Merkel on many key issues and has a negative approval rating among Germans. Merkel was due to meet with Trump at a NATO summit later on Thursday.