RIO DE JANEIRO — President Jair Bolsonaro of Brazil said 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 impact 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 that 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.”