Secretary of State John Kerry on Tuesday saluted German Chancellor Angela Merkel for welcoming thousands of refugees into her country, and warned against "demagogues" who would undermine the alliances that have formed in the decades since World War II.

"To some, formulating the right response to refugees is as easy as putting up a green light or a red one; they just think it's simple," Kerry said during a speech in Brussels on Tuesday morning. "Chancellor Merkel and other European leaders should be commended for trying to cope with this crisis in a humane way that is respectful of the lessons of history."

Kerry's speech was a show of political support for an embattled leader who has paid a political price for opening the door to Syrian refugees. Merkel apologized for the decision after her party lost badly in recent elections, and the German policy contributed to the United Kingdom's vote to exit the European bloc as British voters worried about their inability to control immigration from other EU countries.

Kerry also criticized opponents of countries and global institutions trying to improve the situation for refugees.

"They're playing to every worst fear. They're tapping into the xenophobia, to the nationalism, to the ... economic fear that exists today. And everybody here knows that you cannot allow demagogues to start building up an unrealistic political platform based on bigotry, xenophobia, fear nationalism — bad history [in the] 20th century on that score and I think everybody knows that."

Kerry put the refugee crisis in geopolitical context, implicitly blaming Russia for causing the humanitarian disaster by "turn[ing] a blind eye" to dictator Bashar Assad's attacks on Syrian civilians. He hinted that Russian President Vladimir Putin hopes to benefit from the domestic political turmoil caused around the world by the refugee crisis.

"In many countries, political movements have arisen that advocate, directly or indirectly, not a coming together but rather a splitting apart, running for cover, thinking they can play the ostrich strategy — put your head in the sand and you won't see what's happening because it isn't happening," Kerry said. "And there are malign forces in the world that eagerly anticipate the demise of the institutions that our predecessors ... put together."