US President Donald Trump has scrapped a programme that protects from deportation almost 800,000 young men and women who were brought to the United States illegally as children.
Mr Trump's action, announced by Attorney General Jeff Sessions, rescinds a programme called Deferred Action for Childhood Arrivals, or DACA.
The programme was created by former President Barack Obama and is supported by Democrats and many business leaders.
The Trump administration said no current beneficiaries of the programme would be affected before 5 March.
Most of the immigrants protected by DACA, dubbed "Dreamers", came from Mexico and other Latin American countries.
Mr Sessions said the action does not mean the DACA recipients are "bad people".
"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.
To target hopeful young strivers who grew up here is wrong, because they’ve done nothing wrong. My statement: https://t.co/TCxZdld7L4
— Barack Obama (@BarackObama) September 5, 2017
Mr Obama has said the move targeting young people is "wrong", "self-defeating" and "cruel".
In a statement, he said the action is a political decision, not legally required.
Mr Obama said it is up to Congress to protect DACA recipients and "do it with a sense of moral urgency".
95% of 'Dreamers' are in school/working..much higher % than general population.As things stand they'll become subject to deportation in Mar.
— Caitriona Perry (@CaitrionaPerry) September 5, 2017
The move marked 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.
Mr Trump defended his decision, saying "American workers" must come first.
"Our first and highest priority in advancing immigration reform must be to improve jobs, wages and security for American workers and their families," Mr Trump said in a written statement.
Mexico has condemned the decision, expressing "deep worry" for the uncertainty the young immigrants now face.
"The Mexican government deeply regrets the cancellation" of the programme, the foreign ministry said in a statement.
It said it had a "moral imperative" to urge the Trump administration and Congress to quickly resolve the legal grey area now affecting 800,000 people formerly protected from deportation under the programme.
Mr Trump announced permits would be gradually phased out as they expire over the next six to 24 months, leaving it up to Congress to draft an immigration reform to address the situation of those protected under DACA.
Mexico said its embassy in Washington had already begun writing to US politicians underlining the young immigrants' "value to American society" and urging them to act.
"There is no question that setting immigration policy in the United States is the exclusive role of the American people and their institutions," it said.
"However, our country cannot ignore the fact that thousands of young people born in Mexico will likely be affected by today's decision."
About 625,000 Mexicans are protected under DACA, according to the foreign ministry.
It said they would be welcomed "with open arms" in Mexico if they ended up being deported to the country of their birth, where many in the programme have barely ever lived.
Mr Trump's action, deferring the actual end of the programme, effectively kicks responsibility for the fate of the Dreamers to his fellow Republicans who control Congress.
But Congress has been unable since the president took office in January to pass any major legislation and has been bitterly divided over immigration in the past.
Mr Obama bypassed Congress and created DACA through an executive order.
Mr Trump appeared determined to pressure US politicians to act.
"Congress, get ready to do your job - DACA!" the president wrote on Twitter this morning before the policy announcement was made.
Congress, get ready to do your job - DACA!
— Donald J. Trump (@realDonaldTrump) September 5, 2017
US House speaker Paul Ryan said he hopes the House and Senate can find consensus on a permanent legislative solution in the wake of DACA's reversal.
However, House Democratic leader Nancy Pelosi called today's move "a deeply shameful act of political cowardice".