WASHINGTON — The Trump administration said on Monday that it would speed the deportations of undocumented immigrants who cannot prove they have been in the United States for more than two years, allowing federal agents to arrest and deport more people without a hearing before a judge.

Critics warned that the new rule, set to take effect on Tuesday, could also prevent asylum seekers from applying for refuge in the United States before they are deported. Within hours of its announcement, the American Civil Liberties Union vowed to block it in court.

The shift will expand the use of an immigration law that, until now, was used only to fast-track deportations for migrants who had been in the United States for just a few weeks and were still within 100 miles of the southwestern border. Now, those stopped by federal agents anywhere in the country who cannot prove they have been in the United States for more than two years can be deported without a hearing.

The change was announced a week after Trump administration officials said they would severely restrict asylum at the border.