Former President Obama condemned the Trump administration's decision to rescind a policy that enabled undocumented immigrants brought to the U.S. as children to remain here with temporary permits.

"Let's be clear: the action taken today isn't required legally," the former president wrote in a Facebook post. "It's a political decision, and a moral question."

"Whatever concerns or complaints Americans may have about immigration in general, we shouldn't threaten the future of this group of young people who are here through no fault of their own, who pose no threat, who are not taking away anything from the rest of us," the post continues.

Get Breaking News Delivered to Your Inbox

Mr. Obama, who implemented Deferred Action on Childhood Arrivals (DACA) in 2012, said when he left office he would comment on Mr. Trump's actions at "certain moments where I think our core values may be at stake."

Mr. Obama's executive order deferred deportations for people who came to the U.S. undocumented as children. The Trump administration announced Tuesday that it would rescind DACA after giving Congress six months to figure out how to replace it.

DACA allowed some 800,000 people to legally work and reside in the U.S. "Kicking them out won't lower the unemployment rate, or lighten anyone's taxes, or raise anybody's wages," Mr. Obama wrote.

"To target these young people is wrong – because they have done nothing wrong. It is self-defeating – because they want to start new businesses, staff our labs, serve in our military, and otherwise contribute to the country we love. And it is cruel," he said in the statement.

The post says that the Obama administration implemented DACA "because it made no sense to expel talented, driven, patriotic young people from the only country they know solely because of the actions of their parents." It argues that the Trump administration's decision to rescind the immigration executive order is an affront to "basic decency."

"This is about whether we are a people who kick hopeful young strivers out of America, or whether we treat them the way we'd want our own kids to be treated. It's about who we are as a people – and who we want to be," Mr. Obama wrote.

"These Dreamers are Americans in their hearts, in their minds, in every single way but one: on paper," the post states.

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

Among the issues that would cause Mr. Obama to speak out, he strongly implied earlier, was a rescinding of DACA -- or, as he put it, "efforts to round up kids who have grown up here, and for all practical purposes are American kids, and send them someplace else, when they love this country."