The US government announced it is ending special protections for Salvadoran immigrants, forcing nearly 200,000 who have been in the country since before 2001 to leave the country or face deportation.

The move threatened tens of thousands of well-established families with children born in the United States.

Homeland Security Department Secretary Kirstjen Nielsen announced the end of the 17-year-old "temporary protected status" (TPS) for the Salvadorans,

It had shielded them from deportation ever since two major earthquakes rocked El Salvador in early 2001.

She said damage inflicted in 2001 in the Central American country did not justify another temporary extension, that El Salvador had received significant international aid, and that much of the country's infrastructure had been rebuilt.

They were given 18 months to leave or be deported, enough time that a legislative solution could be crafted by Congress to allow them to stay.

The Department of Homeland Security said: "Only Congress can legislate a permanent solution addressing the lack of an enduring lawful immigration status of those currently protected by TPS who have lived and worked in the United States for many years."

It came in the wake of the termination of similar protections for 59,000 longtime resident Haitians and 5,300 Nicaraguans late last year, after having been allowed to set deep roots inside the United States for decades.