FILE PHOTO: Ernesto Araujo, who was appointed by Brazilian President-elect Jair Bolsonaro as Foreign Minister, arrives for a meeting at the transition government building in Brasilia, Brazil November 22, 2018. REUTERS/Adriano Machado/File Photo

BRASILIA (Reuters) - Brazil has pulled out of a United Nations pact on dealing with rising migration, joining the United States and a growing number of countries in rejecting the agreement, a Brazilian diplomat with direct knowledge of the matter said on Tuesday.

Brazil’s Foreign Minister Ernesto Araújo said last month before he was sworn in that it was his intention to exit the agreement.

A diplomat, speaking on condition they not be named as they were not authorized to speak with the press, confirmed to Reuters that Brazil had officially left the pact.

The Foreign Ministry declined to comment.

Araújo said last month that the international accord was “an inappropriate instrument” to deal with the issue and nations should set their own policies.

With a record 21.3 million refugees globally, the United Nations began work on the non-binding agreement after more than 1 million people arrived in Europe in 2015, many fleeing civil war in Syria and poverty in Africa.

The accord, which addresses issues such as how to protect migrants, integrate them and send them home, has been criticized by mostly right-wing European politicians who say it could increase immigration.

All 193 U.N. members except the United States agreed to its wording in July, but only 164 - including Brazil - formally ratified it.

Araújo has said that Brazil would continue to take in refugees from neighboring Venezuela, but that the fundamental point is restoring democracy in that nation.