BUENOS AIRES — Argentina is so used to celebrating immigration as a cornerstone of society that a 19th-century saying — to govern is to populate — remains in use to this day.
But in an abrupt shift coinciding with the immigration restrictions put in place by the Trump administration, President Mauricio Macri has issued a decree curbing immigration to Argentina, with his government declaring that newcomers from poorer countries in Latin America bring crime.
The measures announced by Mr. Macri in recent days made it much easier to deport immigrants and restrict their entry, prompting irate comparisons to President Trump and igniting a fierce debate over immigration.
“A decree like this scares people,” said Arfang Diedhiou, 33, a Senegalese immigrant who runs his own clothing store here in the capital, Buenos Aires. “It came out just after what Trump did, a coincidence that seems very strange to me.”
Argentina’s president, the son of an immigrant, has echoed some of Mr. Trump’s “America First” theme, making it clear that his “first concern” should be “caring for Argentines, caring for ourselves.”
“We cannot continue to allow criminals to keep choosing Argentina as a place to commit offenses,” Mr. Macri said during a news conference.
His decree has also rekindled criticism of his ties to the American president, whom he calls a friend. In the 1980s, Mr. Macri worked with his father, an Italian immigrant and industrial magnate, on a real estate project in New York that the family ended up selling to Mr. Trump.
Mr. Macri’s immigration measures, while not as far-reaching as Mr. Trump’s decision to halt refugees from around the world and freeze visas from seven predominantly Muslim nations, are raising diplomatic tensions in the region. Some South American leaders are attacking what they view as an attempt to mimic Mr. Trump’s immigration policies and nurture xenophobic sentiment.
“Brothers, Latin American presidents, we can’t follow the immigration policies of the North,” President Evo Morales of Bolivia said.
But opinion polls in Argentina showed widespread support for limiting immigration, and some say the new decree does not go far enough. One right-wing congressman is even calling for a wall to be built on the border with Bolivia.
Claudio Suárez, 65, a worker at a bakery in Buenos Aires, called the immigration curbs “fantastic.”
“Nobody wants scum to come in from other countries,” he said. “Many foreigners come here because health services and education are free. The law should be even stronger.”
Argentina’s history has been written by waves of immigration over the decades. After 19th-century wars of conquest killed off many indigenous people, the authorities encouraged millions of immigrants to come, largely from Europe, to help populate and develop the country.
More recently, governments welcomed newcomers from Latin America, Asia and Africa, opening a path to citizenship for hundreds of thousands of immigrants and ensuring their access to public schools and health care.
Officials in Mr. Macri’s government, which took over in 2015 by vowing to ease polarization and roll back the economic policies of his leftist predecessor, Cristina Fernández de Kirchner, contend that they are still upholding Argentina’s openness to immigrants.
“Everyone should remain calm, because Argentina will continue to be a hospitable and open country,” said Horacio García, Argentina’s top immigration official.
The new immigration decree says it is focused on fighting crime, arguing that 22 percent of inmates in the federal penitentiary system are foreigners. (When all of the country’s prisons are taken into account the figure is closer to 6 percent.)
The decree specifically mentions “organized crime” as a reason for the crackdown, but it expands the offenses that justify expulsion or blocked entry to include any crime that could lead to a prison sentence. Many worry that immigrants can now be expelled for minor crimes, like blocking a road during a protest.
Immigrants hoping to fight a deportation order will have less than a week to file appeals. Previous measures granted 30 days to prepare a defense and the right to a government lawyer.
“Immigrants are hanging by a thread because anything could be cause for deportation,” said Gabriela Liguori, director of the Argentina Commission for Refugees and Migrants, an immigrant rights group.
But the immigration official, Mr. García, said deportations “will only focus on serious crimes.” He contended that the measure was necessary because Argentina had become “defenseless to criminals from other countries.”
Faced with criticism, officials in Mr. Macri’s government have had to make it clear that they are ruling out building a Trump-like wall on the Bolivian border.
“The problem isn’t immigration, but drug trafficking and contraband,” Security Minister Patricia Bullrich said after the Bolivian authorities questioned why she was publicly singling out Bolivian, Paraguayan and Peruvian immigrants for scrutiny.
Despite Mr. Macri’s longstanding connection to the American president, Mr. Trump’s victory put the government here in an awkward spot. After all, Mr. Macri had made no secret that he was rooting for Hillary Clinton, saying that Mr. Trump was focused on building walls.
But then Mr. Macri seemed to draw on his ties to Mr. Trump, becoming one of the first Latin American leaders to speak with him after the American presidential election.
The call was quickly mired in controversy. A prominent Argentine journalist claimed that Mr. Trump had used the occasion to request Mr. Macri’s help in obtaining regulatory approval for a real estate project in Buenos Aires. Spokesmen for both leaders denied the assertion, though it emerged that Mr. Trump’s daughter Ivanka, who had no security clearance, had joined the phone call.
Argentine authorities later confirmed that the Trump venture did not have the permits needed to begin construction. But in the end, plans for a Trump tower in Buenos Aires were called off as Mr. Trump came under pressure over potential conflicts of interest involving pending international deals.
Critics say the new restrictions focus on poor immigrants to distract attention from the economy, which remains sluggish more than a year after Mr. Macri rose to power promising that market-friendly policies would usher in growth.
Scrutinizing immigrants at times of stress is nothing new in Argentina, with the authorities long praising the country’s history of receiving European immigrants while portraying immigration from neighboring countries as less desirable, said Guillermo Kantor, a sociologist who specializes in immigration.
In the late 1990s, President Carlos Menem’s government similarly cracked down on immigrants by associating them with street crime. In 2014, Mrs. Kirchner, the former president, threatened to expel foreigners who committed crimes in an overhaul of the penal code even after her government had legalized the irregular status of many immigrants.
Other parts of Latin America are also grappling with bursts of anti-immigration sentiment. With his nation suffering broad economic declines, Venezuela’s president, Nicolás Maduro, ordered a crackdown on Colombian immigrants in 2015, forcing many to flee across the border. An influx of Haitian immigrants to Chile is fueling a debate there over racism and discrimination.
On the streets of Buenos Aires, immigrants had varying reactions to Mr. Macri’s decree. Jesús Oriona, 45, a Bolivian who moved to Argentina as a teenager, said the government was simply “throwing the blame at immigrants.”
But Maria Alejandra Alviarez, 39, a nurse from Venezuela who moved here a year ago and works in a health food store, said Argentina had been “too free and open” before the decree.
“Macri’s not saying people can’t migrate, and qualified people like me will still be able to come here,” she said.
Still others here contend that the shift is strategic, seeking short-term political points by blaming foreigners for ills in Argentine society ahead of legislative elections this year.
“Of course, we have our share of xenophobia, and now, in the glow of Donald Trump, they want to dilute the fact that a large share of us are children or grandchildren of immigrants,” said Raúl Kollman, 68, a radio show host whose mother emigrated illegally to Argentina to flee the Nazis.