Hungary pulled out of a United Nations global agreement on migration Wednesday, citing security concerns, just days after the accord was reached.

Peter Szijjarto, Hungary’s minister of foreign affairs and trade, announced the withdrawal at a news conference in Budapest, Hungary’s capital, saying the agreement was “in conflict with common sense and also with the intent to restore European security.”

Hungary joined the United States as one of two U.N. members not committing to the agreement, the first of its kind to lay out international standards for countries to address migration. The agreement — the Global Compact for Safe, Orderly and Regular Migration — was announced on Friday.

U.N. officials say the accord is intended to preserve the human rights of all migrants by offering a framework for national governments devising their own policies on migration.

Hungary, which has long called for stricter policies on European migration, had expressed concerns over the agreement during negotiations. Szijjarto said the accord did not address the “fundamental human rights of people who want nothing else than to be able to live in peace and security in their own homelands.”

At least 258 million people worldwide can be classified as migrants, according to the U.N., and that number will grow in coming years. Unlike refugees, who are offered protections under international law, migrants often find themselves without legal rights in the countries they enter, if they do so illegally.

At least 60,000 people migrating internationally have died since 2000 while crossing the sea, while traveling through inhospitable areas, while being held in detention or under other circumstances. The negotiators of the agreement say they were driven by the need to protect members of a vulnerable population who are often demonized and attacked.

The compact itself was driven in part by the 2015 crisis that saw European nations struggle to cope with large numbers of migrants entering the continent. While the number of new arrivals has dropped significantly, the debate about migration has grown heated in Europe. The rise of anti-immigration, populist governments in Italy, Austria and Hungary has added fuel to the debate.

The agreement is expected to be formally adopted in December during a conference in Marrakech, Morocco.