Jean-Claude Juncker has criticised EU countries pulling out of the United Nations (UN) migration pact during a speech in Berlin, where he said Europe “must do everything possible” to kill populism on the continent.

Speaking at an event held by German newspaper Süddeutsche Zeitung (SZ), the EU Commission president said that the growing number of European governments withdrawing from the agreement must be ignorant of its contents.

The list of countries to have exited, which so far includes Austria, Hungary, Croatia, Bulgaria, and most recently the Czech Republic, would not have pulled out of the pact “if they had read it”, Juncker argued, claiming that the principles of “shared responsibility” outlined in the document would actually lead to less illegal immigration.

On Wednesday the Czech Republic became the latest to announce it was rejecting the so-called Global Compact for Safe, Orderly and Regular Migration, which is due to be formally ratified at a meeting in Marrakech, Morocco, next month.

There has been growing concern in a number of UN member states regarding eventual legal implications of the document, which declares migration “inevitable, necessary, and desirable” and requires signatories “commit to eliminate all forms of discrimination” with measures including the state promotion of “diversity”, enacting stiff penalties for “hate crime” and opening up welfare systems to all, including migrants without papers.

Spanish daily the Economist reports Juncker also used his speech at the SZ Economic Summit to defend his performance as head of the Commission, stating that “stupid populists” in Europe have nothing but a “long list of accusations” on issues for which they hold others, “especially Brussels”, to blame.

A major problem in Europe is when “mainstream” parties begin to “say what the populists say” in terms of seeking to address similar concerns, because doing so only emboldens people “to vote for the populists”, according to the Luxembourger Eurocrat.

Voicing his endorsement of French leader Emmanuel Macron’s claim last week that patriotism is “the opposite” of nationalism, Juncker warned against “acting innocent” before going on to imply that carnage in Europe on the scale of the two world wars was inevitable without the death of national sovereignty.

“Madness always returns,” he said, stressing Europe “must do everything possible” to prevent war and that populist and nationalist policies should be stopped at all costs.