Los Angeles: Nearly 200,000 people from El Salvador who have been allowed to live in the United States for more than a decade must leave the country, government officials announced Monday. It is the Trump administration’s latest reversal of years of immigration policies and one of the most consequential to date.

Homeland security officials said that they were ending a humanitarian programme, known as Temporary Protected Status, for Salvadorans who have been allowed to live and work legally in the United States since a pair of devastating earthquakes struck their country in 2001.

Salvadorans were by far the largest group of foreigners benefiting from temporary protected status, which shielded them from deportation if they had arrived in the United States illegally. The decision came just weeks after more than 45,000 Haitians lost protections granted after Haiti’s 2010 earthquake, and it suggested that others in the programme, namely Hondurans, may soon lose them as well. Nicaraguans lost their protections last year.

Immigrant advocates and the El Salvadoran government had pleaded for the United States to extend the programme, as it has several times since 2001. A sense of dread gripped Salvadorans and their employers in California, Texas, Virginia and elsewhere.

“We had hope that if we worked hard, paid our taxes and didn’t get in trouble we would be allowed to stay,” said Veronica Lagunas, 39, a Salvadoran who works overnight cleaning offices in Los Angeles, has two children born in the United States and owns a mobile home.

But the Trump administration has been committed to reining in both legal and illegal immigration, most notably by ending protections for 800,000 young unauthorised immigrants, known as Dreamers, beginning in March unless Congress grants them legal status before then.

And despite its name, the administration says, the Temporary Protected Status programme, known as TPS, had turned into a quasi-permanent benefit for hundreds of thousands of people.

The Department of Homeland Security said that because damaged roads, schools, hospitals, homes and water systems had been reconstructed since the earthquakes, the Salvadorans no longer belonged in the programme.

“Based on careful consideration of available information,” the department said in a statement, “the secretary determined that the original conditions caused by the 2001 earthquakes no longer exist. Thus, under the applicable statute, the current TPS designation must be terminated.”

The ending of protection for Salvadorans, Haitians and Nicaraguans leaves fewer than 100,000 people in the programme, which was signed into law by President George H.W. Bush in 1990.

It provides temporary lawful status and work authorisation to people already in the United States, whether they entered legally or not, from countries affected by armed conflict, natural disaster or other strife. The homeland security secretary decides when a country merits the designation and can renew it for six, 12 or 18 months.

There is no limit to the number of extensions a country can receive. Countries that have received and then lost the designation in the past include Bosnia and Herzegovina, which endured a civil war in the 1990s, and Guinea, Sierra Leone and Liberia during the Ebola crisis. El Salvador was one of the first countries in the programme because of its civil war; that designation expired in 1994.

The administration is giving Salvadorans in the programme until September 2019 to get their affairs in order. After that, they no longer will have permission to stay in the country, forcing them into a wrenching decision.

Lagunas said that she would remain in the United States illegally, risking arrest and deportation. But she would lose her job of 12 years without the work permit that comes with the protection. Her family would lose medical insurance and other benefits.

“There is nothing to go back to in El Salvador,” she said, speaking in Spanish. “The infrastructure may be better now, but the country is in no condition to receive us.”

Temporary protections were granted to Salvadorans who were in the United States in March 2001 after two earthquakes in January and February of that year killed more than 1,000 people and destroyed hundreds of thousands of homes. Over the next 15 years, the George W. Bush and Obama administrations extended the protections several times.

In 2016, the final time, the government cited several factors, including drought, poverty and widespread gang violence in El Salvador, as reasons to keep the protections in place.

El Salvador has rebuilt since the earthquakes. But the violence — San Salvador, the capital, is considered one of the most dangerous cities on Earth — has inhibited investment and job creation, and prompted tens of thousands to flee. The country’s economy experienced the slowest growth of any in Central America in 2016, according to the World Bank.

But officials in the Trump administration say the only criteria the government should consider is whether the original reason for the designation — in this case, damage from the earthquakes — still exists.

El Salvador’s president, Salvador Sanchez CerEn, spoke by phone with Kirstjen Nielsen, the homeland security secretary, on Friday to make one last plea. After Nielsen’s decision was announced Monday, Sanchez posted on Twitter, calling it an 18-month “extension” of TPS. The post prompted a flurry of angry replies accusing him of trying to spin the bad news.

Flor Mejia, who works in a day care centre on the outskirts of San Salvador, said her family gets by with the help of money sent regularly by her sister and brother-in-law, who recently bought a home and have two children born in the United States. Her parents live in Chalatenango, a rural province in the northern part of the country, and are subsistence farmers, growing corn and beans for the family’s food supply.

“It’s going to be very difficult for my parents, not having this income anymore,” Mejia said.