BERLIN (Reuters) - German Chancellor Angela Merkel defended a United Nations agreement on migration in a passionate speech to parliament on Wednesday, accusing its opponents of “nationalism in its purest form”.

German Chancellor Angela Merkel attends a session at the lower house of parliament Bundestag in Berlin, Germany November 21, 2018. REUTERS/Fabrizio Bensch

The U.N. pact, to regulate the treatment of migrants worldwide, was approved in July by all 193 member states except the United States and is to be signed in Morocco next month.

But Australia on Wednesday said it would not sign up to the pact, joining nations including Israel, Hungary and Austria who have said it would compromise immigration policy.

In an appeal to embrace a multilateral approach to the migrant issue, Merkel made a thinly veiled attack on U.S. President Donald Trump and her far-right opponents at home.

“There are people who say they can solve everything themselves and don’t have to think about anyone else, that is nationalism in its purest form,” she told the Bundestag lower house of parliament in an unusually passionate address.

Merkel, whose 13-year chancellorship has been marked by her open-door migrant policy, said the U.N. pact was in Germany’s interests and would not infringe on national sovereignty.

The Global Compact for Safe, Orderly and Regular Migration is a framework for cooperation and aims to reduce illegal migration, help integrate migrants and return them to their home countries. It asks backers to use detention only as a last resort. Impetus for the pact followed Europe’s biggest influx of refugees and migrants since World War Two.

Some of Merkel’s conservatives, notably Health Minister Jens Spahn who is standing to succeed her as head of the Christian Democrat party (CDU), have called for a broader debate before Germany signs up to the pact. Far-right Alternative for Germany (AfD) lawmakers oppose it.

“This pact for migration, like the refugee pact, is the right attempt to find solutions for global problems internationally, together,” Merkel said to heckles from the AfD.

She said in 2015 Germany realised that the problem of flight and migration had to be tackled at an international level, that “no one country can do it alone”.

“The debate about a global pact for migration, for orderly, legal migration in a world where there are 222 violent conflicts ... 68.5 million refugees, 52 percent of whom are children, this organization plays a central role,” she said.