U.N. Secretary-General Antonio Guterres said Monday migration “should be well managed and safe, not irregular and dangerous” as he praised a group of more than 150 nations for adopting a global pact meant to improve the way the world handles the flow of migrants.

Speaking at the opening of a two-day conference in Marrakech, Morocco, Guterres acknowledged the nations — many of them in Europe — that are critical of the Global Compact for Safe, Orderly and Regular Migration.

He said those who fear the document would violate national sovereignty by imposing migration policies, or that it would create a recognized right for people to migrate wherever they want, whenever they want, are mistaken.

“The Compact only reaffirms that migrants should enjoy human rights, and independently of their status,” Guterres said.

The Global Compact features 23 objectives, including boosting access to basic services, strengthening anti-smuggling and anti-trafficking efforts, eliminating discrimination, safeguarding conditions that ensure decent work, and facilitating safe and dignified return for those who are sent back home. It is not legally binding.

The agreement was negotiated during a two-year process, and the United States was the first country to walk away, deciding in December of last year that the proposed agreement was “inconsistent with U.S. immigration and refugee policies.”

Then-U.S. Secretary of State Rex Tillerson said the United States supports international cooperation on migration issues, “but it is the primary responsibility of sovereign states to help ensure that migration is safe, orderly, and legal.”

Since then, others have followed citing similar concerns, including Australia, Austria, Hungary, Latvia, Poland and the Dominican Republic.

Guterres said Monday that 80 percent of migrants take safe, orderly routes, but that more than 60,000 people have died trying to make dangerous treks across deserts, oceans and rivers or with human smugglers.

“But whether their movement is voluntary or forced; and whether or not they have been able to obtain formal authorization for movement, all human beings must have their human rights respected and their dignity upheld,” he said. “To deny this, and to vilify any group of people, is the road to dehumanization and horror.”

The United Nations estimates there are about 258 million migrants in the world — or just over three percent of the world’s population. The world body considers a migrant to be anyone who changes their country, regardless of the reason. It expects the number of migrants to increase due to factors such as population growth, trade, rising inequality and climate change.