Donald Trump has scrapped an Obama-era programme that protects immigrants brought illegally into the United States as children from deportation, but has delayed implementation until March - giving Congress six months to decide the fate of almost 800,000 young people.
As the "Dreamers" who have benefited from the five-year-old programme were plunged into uncertainty, business leaders, mayors, Democratic lawmakers, unions and civil liberties advocates condemned the president's move.
The action was announced not by the president but by Jeff Sessions, his attorney general, who called the Deferred Action for Childhood Arrivals (DACA) programme an unconstitutional overreach by Democratic former president Barack Obama. There would be an "orderly, lawful wind-down," Mr Sessions said.
Mr Trump later issued a written statement saying that, "I do not favour punishing children, most of whom are now adults, for the actions of their parents. But we must also recognise that we are nation of opportunity because we are a nation of laws."
The administration said nobody covered by the programme, which provided work permits in addition to deportation protection and primarily benefited Hispanic immigrants, would be affected before 5 March. Most of the people covered by DACA are in their 20s.
By deferring the actual end of the programme, Mr Trump effectively kicked responsibility for the fate of those covered by DACA to his fellow Republicans who control Congress. But neither Mr Trump nor Mr Sessions offered details of the type of legislation they would want to see, and Mr Trump's spokeswoman offered only a broad outline.
Since Mr Trump took office in January, Congress has been unable to pass any major legislation, most notably failing on a healthcare overhaul, and lawmakers have been bitterly divided over immigration in the past.
The looming congressional elections in November 2018 could also complicate prospects for compromise between the two parties and within an ideologically divided Republican Party.
The Democratic attorney general of Massachusetts, Maura Healey, said a coalition of states planned to file suit in the coming days to defend DACA, and one advocacy group announced its own legal action.
"President Trump's decision to end DACA is a deeply shameful act of political cowardice and a despicable assault on innocent young people in communities across America," said Nancy Pelosi, the top Democrat in the House of Representatives.
"This is a sad day for our country," added Facebook Inc founder Mark Zuckerberg. "The decision to end DACA is not just wrong. It is particularly cruel to offer young people the American Dream, encourage them to come out of the shadows and trust our government, and then punish them for it."
Nearly 800,000 people stepped forward, admitted their illegal immigrant status and provided personal information to the government to apply for the DACA programme, and now face the potential of being deported starting in March. The "Dreamers" are a fraction of the roughly 11 million illegal immigrants in the United States, most of whom are Hispanic.
Supporters of the programme argue that people covered by it were raised and educated in the United States and integrated into society, with scant ties to their countries of origin. Opponents of DACA argue against amnesty for illegal immigrants and say that such immigrants take jobs from US citizens.
"The cancellation of the DACA programme is reprehensible," the US Conference of Catholic Bishops said in a statement.
Mr Sessions said the action did not mean DACA recipients are "bad people or that our nation disrespects or demeans them in any way".
"To have a lawful system of immigration that serves the national interest, we cannot admit everyone who would like to come here. It's just that simple. That would be an open-border policy and the American people have rightly rejected that," Mr Sessions said.
Ending DACA was the latest action by Mr Trump that is sure to alienate Hispanic Americans, a growing segment of the US population and an increasingly important voting bloc. Most of the immigrants protected by DACA came from Mexico and other Latin American countries.
The Mexican government said it "profoundly laments" the decision to phase out DACA and would strengthen efforts to guarantee consular protections for affected Mexican youth.
Threat of lawsuits
Elaine Duke, acting head of the Homeland Security Department, issued a memo rescinding DACA. The department will provide a limited window - until 5 October - for some DACA recipients whose work permits expire before 5 March to apply to renew those permits. In addition, the department will adjudicate any new DACA requests, or renewal requests, accepted as of 5 September. This would mean that some beneficiaries of DACA could work legally in the country through 2019.
DACA recipients whose work permits expired would be considered to be in the country and eligible for deportation, but would be a low priority for immigration enforcement, administration officials said.
The administration said the president's decision was prompted in part by a threat from several Republican state attorneys general, led by Texas, to file legal challenges in federal court if Mr Trump did not act to end DACA.
House of Representatives Speaker Paul Ryan called on lawmakers to find a long-term solution for the young people affected by the reversal of the programme.
"At the heart of this issue are young people who came to this country through no fault of their own, and for many of them it's the only country they know. Their status is one of many immigration issues, such as border security and interior enforcement, which Congress has failed to adequately address over the years," Mr Ryan said.
Mr Trump made a crackdown on illegal immigrants a centrepiece of his 2016 election campaign and his administration has stepped up immigration arrests. As a presidential candidate Mr Trump promised to deport every illegal immigrant.
Mr Trump, who as recently as Friday said he "loved" the Dreamers, left the DACA announcement to Mr Sessions, with whom the president has had tensions arising from the ongoing investigation into potential collusion between his presidential campaign and Russia.
DACA was devised after the Republican-led Congress failed to pass comprehensive immigration reform that would have created a pathway for citizenship for certain illegal immigrants.
The decision to scrap it is the latest action by Mr Trump to erase key parts of his Democratic predecessor's legacy.
This includes pulling the United States out of the Paris climate accord, abandoning a 12-nation Pacific trade deal, seeking to dismantle the Obamacare healthcare law, rolling back environmental protections, reversing parts of Obama's opening to Cuba and removing protections for transgender people.