President Jair Bolsonaro of Brazil said on Wednesday that his government would no longer be a party to a United Nations migration accord signed last month, arguing that “not just anyone can come into our home.”

The decision is not expected to have any immediate effects because the deal, known as the Global Compact for Safe, Orderly and Regular Migration, is not legally binding on the more than 160 nations that signed it.

But it may signal Latin America’s largest nation, which has long been welcoming to foreigners, may adopt a harder line on immigration as Mr Bolsonaro’s far-right administration gets settled.

“Brazil has a sovereign right to decide whether or not it accepts migrants,” Mr Bolsonaro said in a message posted on Twitter. “Anyone who comes here must be subject to our laws and customs, and must sing our national anthem and respect our culture.”

Diplomats spent nearly two years negotiating the migration accord, which sought to lay out basic principles to address the surge in global migration in a humane and pragmatic manner.

The 34-page pact called for the collection of better data on migrant movements, the strengthening of legal paths to migration, efforts to combat human trafficking and cooperation to ease the safe return of migrants to their original countries.

The pact does not bar signatories from enacting and enforcing their own immigration laws, although Mr Bolsonaro suggested it would. “Not just anyone is allowed to enter into our house, just like not just anyone will enter Brazil thanks to a pact adopted by third parties,” he wrote.

Immigration policy was not a dominant issue during last year’s presidential campaign in Brazil, which Mr Bolsonaro won by vowing to take an iron-fisted approach towards violent crime and graft.

Yet Brazilians in some communities along the border with Venezuela have begun to criticise the country’s permissive immigration policies. Thousands of Venezuelans fleeing hunger and destitution have crossed into Brazil in recent months.

Venezuelan Refugee Crisis: in pictures Show all 23 1 /23 Venezuelan Refugee Crisis: in pictures Venezuelan Refugee Crisis: in pictures One of the many children that have left their homes in Venezuela and seek temporary accommodation on their journey south. In Bogotá, Columbia this Informal Tented Settlement close to the central bus station is now home to several hundred refugees Paddy Dowling Venezuelan Refugee Crisis: in pictures People leave Venezuela carrying their worldly possessions and enter Columbia filing past on the bridge at Cúcuta. At the height of the crisis this August up to 40,000 were crossing each day Paddy Dowling Venezuelan Refugee Crisis: in pictures Katiuska Rodriguez, 30, left three children back in Venezuela and stands at traffic lights with her life story on a cardboard sign in Quito begging for donations Paddy Dowling Venezuelan Refugee Crisis: in pictures Kevin Reynold, 11, walked and hitchhiked with his family for 21 days to reach Quito, Ecuador. They arrived penniless and exhausted. CARE Ecuador through there delivery partners ADRA Ecuador are able to offer shelter, food and psychosocial support Paddy Dowling Venezuelan Refugee Crisis: in pictures Jesus Hidalgo, 21, walked 20 days through Columbia arriving hungry and exhausted. “The Columbian people were very kind to us he said.” Paddy Dowling Venezuelan Refugee Crisis: in pictures Ruth Santos 52, arrives with her husband and their two children at a shelter in Quito operated by the ‘People for Venezuela’ group and supported by CARE Ecuador. When CAREs delivery partner ADRA Ecuador welcome her she breaks down with emotion Paddy Dowling Venezuelan Refugee Crisis: in pictures Yolanda Mendez 27, from Puerto de la Cruz in Venezuela, left her husband and child to find work in Ecuador ahead of their arrival in the coming months. She is one of many mothers leaving their children behind with partners or relatives in order to support them Paddy Dowling Venezuelan Refugee Crisis: in pictures Streams of people leave Venezuela reach the midway point on the bridge entering Columbia at Cúcuta. The first round of immigration checks to see if they had the Andean card or passport stamped. At the height of the crisis this August up to 40,000 were crossing each day Paddy Dowling Venezuelan Refugee Crisis: in pictures Jesus Bolivar, 29, worked in Quito to support his family back home, he handed out Bolivares the defunct Venezuelan currency for free with purchases of lollipops “Take which ever note you want, its completely worthless”. Venezuelan Refugee Crisis: in pictures Victoria 27, was tricked into prostitution. She has suffered gender based violence, rape and has been stabbed. Such is the vulnerability of so many Venezuelan women trying to find ways to work and send money home to their families. Paddy Dowling Venezuelan Refugee Crisis: in pictures Hender Mendez Diaz, arrives with his wife and their two children at a shelter in Quito operated by the ‘People for Venezuela’ group and supported by CARE Ecuador. He worked for PDVSA the Venezuelan Oil company for 26 years and was dismissed for joining a demonstration with 20,000 fellow employees objecting to the restructuring plans. He received no pension and no medical support for him or his family Paddy Dowling Venezuelan Refugee Crisis: in pictures Maria Isabella 7, stood at reception with her mother at the Foundation of Migrant Attention in Bogotá, Columbia. After resting at the shelter for five days, and with their worldly possessions in two plastic bags, their journey to Ecuador continues. Sister Teresina hands Maria Isabella, 7, a bear for her to take and she replied “Thank you sister, this bear is the only thing I have in the world, I will look after him” Paddy Dowling Venezuelan Refugee Crisis: in pictures Streams of people leave Venezuela and enter Columbia filing past on the bridge at Cúcuta. At the height of the crisis this August up to 40,000 were crossing each day Paddy Dowling Venezuelan Refugee Crisis: in pictures David Santos 8, arrives with her family at a shelter in Quito operated by the ‘People for Venezuela’ group and supported by CARE Ecuador Paddy Dowling Venezuelan Refugee Crisis: in pictures Gilberto Gomez 39, arrived at Rumichaca with his brother Pedro. They has managed to sell what possessions they could from their homes for a fraction of their value and purchase bus tickets to get them to Ecuador Paddy Dowling Venezuelan Refugee Crisis: in pictures John Hydro Fernandez 21, has not eaten properly for 3 years living in Venezuela. He now lives at an Informal Tented Settlement in Bogotá, Columbia, close to the central bus station which is now home to several hundred refugees. He has had fever for five days and does not have the money to see a doctor, he wept from the pain. Paddy Dowling Venezuelan Refugee Crisis: in pictures Kare Angely 4, sits on top of her mothers suitcase huddled in a blanket to shield her from the freeing cold temperatures at Rumichaca border crossing on the Columbian side. Sofia her mother couldn’t stay in Venezuela any longer as there was no food for the children Paddy Dowling Venezuelan Refugee Crisis: in pictures Venezuelan’s queued late into the night in Ecuador at Rumichaca on the border. The lucky few will have a seat on this bus destined for Huaqillias on the Peruvian border Paddy Dowling Venezuelan Refugee Crisis: in pictures Richard Villaneuva, 18, walked and hitchhiked for 20 days through Columbia. He was one of a large exodus of single men leaving Venezuela alone rather than in groups as they felt they had more chance in being able to hitch a lift Paddy Dowling Venezuelan Refugee Crisis: in pictures Venezuelan’s pass through Columbian migration at Rumichaca, they exit through metal barriers herding them through like cattle. The temperature drops to 5 degrees Paddy Dowling Venezuelan Refugee Crisis: in pictures Jhoan Cedeno 24, walked and hitchhiked for 19 days through Columbia arriving hungry and exhausted. “I need to find a job to be able to send some money home for my father who is unwell, It is difficult to find work here.” Paddy Dowling Venezuelan Refugee Crisis: in pictures Bethzaz Roca 23, an architectural graduate, sits on a bench at Rumichaca in the last of the evening sun whilst waiting for a bus to take her to Quito. She hope to be able to use her degree to find a good job but has concerns about xenophobia living in Ecuador as a Venezuelan Refugee. Paddy Dowling Venezuelan Refugee Crisis: in pictures On the Columbian border of Arauca, where hostility hung in the air with the humidity. Prostitutes sit waiting for clients in one of the 15 brothels in the town. Girls are recruited into the industry as young as fourteen or fifteen years old. Paddy Dowling

Mr Bolsonaro did not signal whether his government’s approach to the Venezuelan exodus would change, but he suggested Brazil would continue to embrace those in need.

“We will never withhold help to those in need, but immigration cannot be indiscriminate,” he said in a second message on Twitter. “The defence of national sovereignty was one of the cornerstones of our campaign and it will be a priority of our government.”

Mauricio Santoro, a professor of political science at Rio de Janeiro State University, said Mr Bolsonaro was misguided in dropping out of the accord.

“There are close to 1 million foreigners in Brazil and more than 3 million Brazilians abroad,” he said. “It’s in the national interest to have good global rules to protect immigrants and to participate in creating them.”

Mr Santoro said the decision would mean little to Mr Bolsonaro’s core supporters. But it aligns Brazil’s president ideologically with other conservative leaders who have risen to power by opposing multilateral approaches to contentious issues, including climate change and the treatment of refugees.

The Trump administration was among the handful of countries that chose not to join the migration accord, which was signed in early December. Other nations that rejected it included Hungary, Austria, Bulgaria, the Czech Republic, Poland, Slovakia, Australia and Israel.

People from Argentina, Paraguay, Uruguay, Bolivia, Chile, Peru, Colombia and Ecuador are allowed to work and become permanent residents in Brazil easily, under a visa accord in force for several years.

As the exodus from Venezuela has intensified, Brazil has allowed Venezuelans to obtain work documents and has helped a few thousand resettle from border communities to larger cities with more job opportunities.