And now, they have less than two years to leave, find another legal way to stay or face deportation.
The Department of Homeland Security is ending "temporary protected status," or TPS, for Salvadorans, according to a source familiar with the decision.
Here's a look at some of the key events and issues at play:
It started with an earthquake.
The 7.7-magnitude quake that struck El Salvador in January 2001 was the worst to hit the country in a decade. Then, two powerful quakes shook the country the following month.
Neighborhoods were buried. Homes collapsed. More than 1,100 people were killed. Another 1.3 million were displaced.
The devastation spurred a decision that March by then-US Attorney General John Ashcroft: Immigrants from El Salvador who'd been in the United States since February 2001 could apply for temporary protected status, which would protect them from deportation and allow them to get work permits. It was an 18-month designation.
Now, it's been nearly 17 years. Time after time, officials from different administrations have determined conditions in El Salvador hadn't improved enough for migrants with TPS to return. On Monday, the Trump administration decided to end protections with an 18-month wind-down period, the source said.
Estimates differ for exactly how many immigrants the decision will affect. There were 263,282 Salvadoran TPS beneficiaries at the end of 2016, according to the latest statistics provided to CNN by US Citizenship and Immigration Services. Activists and experts have put the number of Salvadorans who could lose protections closer to 200,000, noting that official statistics likely include people who are no longer in the program because their immigration status has changed or they have left the United States.
Immigrant rights advocates say it is unfair and cruel to end TPS for Salvadorans who've built lives, paid taxes, contributed to the economy and raised families for nearly two decades in the United States. They also argue that violence and widespread poverty make it unsafe for migrants to return to El Salvador.
Those who support ending TPS for Salvadorans and other immigrants, such as the Federation for American Immigration Reform, say there's a reason the designation was referred to as "temporary" and argue that conditions in El Salvador are good enough for migrants to return.
Salvadoran immigration to the US has a long history.
El Salvador is about the size of New Jersey. And it's nearly 2,000 miles from Washington.
But the small country of 6.2 million people has become a big deal in the US immigration debate.
Even before the earthquakes, Salvadoran immigrants had been streaming into the United States. A major driver: the country's civil war, which lasted from 1980 to 1992. Experts estimate the conflict sent more than 25% of El Salvador's residents fleeing for their lives. More than 330,000 Salvadorans came to the United States between 1985 and 1990, according to the Migration Policy Institute.
And in recent years, while immigration from Mexico has slowed, the rate of immigration from El Salvador and other Central American countries has been on the rise.
About 465,000 of the Salvadoran immigrants living in the United States are undocumented, according to an estimate from the Migration Policy Institute.
In the last five years, more than 58,000 unaccompanied minors from El Salvador were apprehended at the US-Mexico border, according to US Customs and Border Protection. And in the last fiscal year, which ended in September, more than 24,000 Salvadoran parents and children traveling together were apprehended at the border.
MS-13: A new Public Enemy No. 1
The Trump administration has repeatedly tied the youth apprehended at the border to the notorious Mara Salvatrucha gang, known as MS-13.
And Trump frequently invokes MS-13 as he vows to step up immigration enforcement.
MS-13 is strongest in Central America, especially El Salvador. But the gang actually began in Los Angeles in the 1980s, during another wave of Salvadoran migration. Analysts say its offshoots in Central America took hold when members were deported by the US.
Immigrant rights groups say it's misleading to use MS-13 as an excuse for any crackdown and note that many of the gang's victims are immigrants.
In a class action lawsuit filed last year, the ACLU accused the administration of using unsubstantiated claims of gang affiliation to detain and deport immigrant teens.
In 2017, more than 1,200 people with suspected gang ties were deported to El Salvador, according to migration officials there. That's more than double the number of suspected gang members deported to El Salvador in 2016.
While MS-13 and TPS are separate issues, some see the Trump administration's escalation in tough talk about the gang as a bellwether for officials' approach toward the region.
El Salvador relies on money from immigrants.
Ending TPS for Salvadorans could be a big blow to El Salvador's economy.
Remittances, the money immigrants send home, make up more than 17% of El Salvador's GDP.
Most of that money, experts say, comes from Salvadorans living in the United States.
And Salvadoran officials have taken note.
"Ending TPS will be catastrophic for El Salvador's economy," Foreign Minister Hugo Martinez wrote in a recent op-ed, "because it will add more deportees to the ranks of the unemployed and eliminate the remittances, which support many families in El Salvador."
This isn't the first -- or last -- time you'll hear about TPS.
Congress created TPS in 1990 as a form of humanitarian relief to help people who would face extreme hardship if forced to return to homelands devastated by armed conflict and natural disasters. Currently, about 437,000 people from 10 countries have TPS, according to the Congressional Research Service, but tens of thousands will lose that protection in the coming years.
Salvadorans are just the latest group whose TPS designation is on the chopping block.
Last month, the Trump administration announced that in July 2019, it would end TPS for more than 50,000 Haitians who sought refuge in the United States after a catastrophic earthquake hit that country in 2010.
Last year, officials also announced that TPS for Nicaraguan and Sudanese immigrants would end.
Honduran immigrants got a brief reprieve in November, when the Department of Homeland Security postponed its decision about how to handle the roughly 86,000 people with TPS from that Central American nation, triggering an automatic six-month extension. But later this year, that decision will once again be up for review.
This year officials will also have to decide whether to extend TPS for Nepal, Somalia, Syria and Yemen. The Trump administration extended TPS for South Sudan last year and will reconsider the issue again in 2019.
Some activists are also pushing for Congress to come up with a more permanent solution. A bill introduced last year would give people with TPS an opportunity to apply to become permanent US residents.
This story has been updated to reflect Monday's decision and add more detail about why some experts and activists say fewer Salvadorans would be affected.
™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.