FILE PHOTO: Slovakia's Foreign Minister Miroslav Lajcak addresses a news conference after a European Union foreign ministers meeting in Brussels, Belgium, December 13, 2016. REUTERS/Francois Lenoir/File Photo

BRATISLAVA (Reuters) - Slovak Foreign Minister Miroslav Lajcak has withdrawn his resignation and will stay in cabinet after a dispute over his nation’s rejection of a U.N. pact on treatment of migrants, he said in a statement on Friday.

Lajack, who protested parliament’s vote against the global deal last month, said he reversed his decision after guarantees from Prime Minister Peter Pellegrini the country would not change course away from its active European Union and NATO military alliance memberships.

“I have received clear guarantees that Slovakia will not take any steps that would cast doubts on basic pillars of our foreign policy,” he said, adding he did not want to weaken Slovakia’s foreign policy position by resigning.

Lajcak was president of the United Nations General Assembly when the pact was adopted, following the biggest influx of migrants into Europe since World War Two, many fleeing conflicts and poverty in the Middle East, Africa and beyond.

The deal, due to be ratified formally this month, was approved in July by all 193 U.N. nations except the United States, which backed out last year.

But other EU states like Austria, Hungary and the Czech Republic have since shunned the pact, highlighting central and eastern European nations’ tough line on migration that clashes with others in the EU bloc.

Pellegrini has said Slovakia would “never” accept the pact because of its take on migration as a generally positive phenomenon, which contradicts Slovakia’s will to distinguish among migrants.