MARRAKESH, Morocco (Reuters) - Officials from more than 70 cities from around the world on Saturday pledged to work closer together to tackle migration flows, supporting a United Nations pact which a rising number of countries have pulled out from.

With a record 21.3 million refugees globally, all 193 UN members except the United States finalized in July the so-called Global Compact for Safe, Orderly and Regular Migration to better handle migration.

The pact will be adopted early next week in the Moroccan city of Marrakesh but right-wing European governments such as Austria, Hungary or Poland have since then dropped out.

Trying to counter this officials from over 70 cities met in Marrakesh to exchange how to better work together on migrant flows such as providing housing or jobs -- or in the case of African cities skills so that people do not head to Europe.

“We want to get our voices heard by national governments,” said Yvonna Aki-Sawyerr, mayor of Freetown in Sierra Leone in West Africa, told Reuters. “Cities are faced with the challenges.”

Marvin Rees, mayor of the British city of Bristol, said the UN pact was necessary as it was impossible to ignore migration flows. “People will be migrating.”

Some city representatives present were from countries that had pulled out of the pact, such as the United States, or are critical of it, such as Italy, organizers said.

In a draft for the U.N. forum the cities pledged to “support appropriate reception of refugees and asylum-seekers” and “strengthen capacity for reception”.

The UN pact addresses issues such as how to protect people who migrate, how to integrate them into new countries and how to return them to their home countries.

The United Nations has hailed it as an historic and comprehensive pact that could serve as a basis for future policies.

The pact is not binding but has met fierce resistance from Western right-wing governments and parties which frame it as encouraging migration.

Austria, for example, said in October it will back out because the pact will blur the line between legal and illegal migration, echoing comments from Hungary and Poland.