WASHINGTON — Thousands of immigrants from Nicaragua who came to the United States illegally, many of them decades ago, will lose special permission allowing them to stay in the country, the Trump administration said on Monday.

However, officials from the Department of Homeland Security said the effective date of termination would be delayed one year, until Jan. 5, 2019, to give about 2,500 individuals time to leave the country or adjust their immigration status.

The program allowing them to stay, Temporary Protected Status, was enacted by Congress in 1990 to protect foreigners, particularly Central Americans, fleeing war, natural disasters or catastrophes and was extended to Haitians after the 2010 earthquake.

Officials said that Elaine Duke, the acting secretary of homeland security, had not made a decision on hundreds of thousands of immigrants from Haiti, El Salvador and Honduras who are also covered under the program. The department had until Monday to extend or terminate the program for Nicaragua and Honduras. Ms. Duke, saying she did not have enough information, said she would continue to review protections for Hondurans. The temporary protective status covering immigrants from Honduras will be extended for at least six months, through July 5.