Hungarian Foreign Minister Peter Szijjarto says the European country will quit the United Nations migration pact before its final approval.
Szijjarto said on Wednesday that the accord posed a "threat to the world."
"This document is entirely against Hungary's security interests," Szijjarto told a news conference in the capital Budapest.
The top diplomat went on to say that Hungary would not take part at an upcoming meeting in Morocco.
Elsewhere in his remarks, Szijjarto said the country would also oppose the pact should it come up for a vote in the UN General Assembly.
The 193-member Assembly adopted a political declaration in 2016, in which they agreed to spend two years negotiating the pact on safe, orderly and regular migration. The accord is to be formally adopted in December.
Hungary’s right-wing nationalist Prime Minister Viktor Orban has been one of the strongest opponents to the European Union’s migration policy since his government fenced off Hungary’s southern borders in 2015 to keep out refugees.
Hungary says it would follow the United States, which quit talks on the pact in December due to concerns over its sovereignty.
US President Donald Trump said on Friday that immigration was changing the culture and was “very negative” for Europe due to security risks, using similar language to Hungary’s Orban.
Human Rights Watch has repeatedly censured Hungary for its "cruel and violent treatment" of refugees.
Hungary, along with Poland and the Czech Republic, defended its “right” to reject EU-imposed refugee quotas amid pressure from the European Commission. Despite repeated warnings by the Commission, the three countries continue to pursue a course of non-compliance, arguing that refugees pose a direct threat to public security.
In September last year, Hungary also claimed that fences erected on its borders with Croatia and Serbia had helped slash the inflow of refugees by over 99 percent since 2015. The country’s border fence has been repeatedly censured by other European states, as well as by EU politicians, though Budapest has resisted pressures to remove it.
Earlier this year, Orban described Muslim refugees arriving in Europe from conflict zones in the Middle East and North Africa as “Muslim invaders.”