After the Trump administration moved Tuesday to scrap a program allowing undocumented immigrants brought to the US as kids to remain in the country legally—potentially putting 800,000 lives in limbo—former President Barack Obama lambasted the decision, calling it "wrong," "self-defeating," and "cruel."

Obama, who created the Deferred Action for Childhood Arrivals (DACA) program, slammed the move in a lengthy Facebook post, framing it as a political calculation that's "contrary to our spirit, and to common sense."

"Let's be clear: The action taken today isn't required legally," Obama wrote. "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."

Attorney General Jeff Sessions announced the White House would "wind down" DACA in question at the Department of Justice Tuesday. The Trump administration has effectively handed responsibility for the fate of the 800,000 people protected by the program to Congress, which has the power to write a law making DACA permanent.

According to the Washington Post, the Department of Homeland Security is no longer taking new applications to the program. The "DREAMers" who received work permits through DACA can continue working until their permits expire. Those whose permits are up before March 5, 2018, can apply for two-year renewals up until October 5.

In criticizing the decision to end DACA, which Obama established by executive order back in 2012, he emphasized that many DREAMers have never known a country other than the US.

"This is about young people who grew up in America—kids who study in our schools, young adults who are starting careers, patriots who pledge allegiance to our flag," Obama wrote. "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."