On Jan. 20, President Barack Obama, right, poses with President-elect Donald Trump at the White House. (Evan Vucci/AP)

Former president Barack Obama said Tuesday that it is “wrong,” “self-defeating” and “cruel” for the Trump administration to end an Obama-era program that allowed younger undocumented immigrants to continue to live in the United States without fear of deportation.

“Let’s be clear: The action taken today isn’t required legally. It’s a political decision, and a moral question,” Obama said in a lengthy statement posted on his Facebook page on Tuesday afternoon, following an announcement earlier in the day that the Trump administration will unwind the program, pending action from Congress in the next six months. “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. … Kicking them out won’t lower the unemployment rate, or lighten anyone’s taxes, or raise anybody’s wages.”

Obama started the Deferred Action for Childhood Arrivals program, also known as DACA, through executive action in 2012 after legislation aimed at doing the same thing failed in Congress, and he defended his decision to do so in the statement. Under the program, young people who were illegally brought to the United States as children can apply to receive a renewable two-year work permit, allowing them to get a driver's license and qualify for lower tuition rates at public universities. Since it began, nearly 800,000 young people have qualified for the program. Obama said that many of these young people have not known life in any country but the United States, and they are Americans “in their hearts, in their minds, in every single way but one: on paper.” The program allows these young people to live their lives without fear of deportation, Obama said, and that with the Trump administration's decision, a “shadow has been cast over some of our best and brightest young people once again.”

The Trump administration is rescinding Deferred Action for Childhood Arrivals. The Obama-era program granted two-year work permits to undocumented immigrants brought into the country as children. (Jenny Starrs/The Washington Post)

The Trump administration announced Tuesday that the Department of Homeland Security would no longer accept new DACA applications. Those already enrolled will be able to continue working until their permits expire, and those whose permits expire by March 5, 2018, will be permitted to apply for two-year renewals as long as they do so by Oct. 5. Ten Republican state attorneys general had threatened to sue Trump if he did not repeal DACA by Sept. 5.

As the Trump administration explains and defends its decision to unwind the program, the president and top officials have focused on the legality of Obama's action and have urged Congress to take action. Attorney General Jeff Sessions, who announced the decision on behalf of the administration on Tuesday morning, accused Obama of an “open-ended circumvention of immigration law through unconstitutional authority by the executive branch.” Trump said in a statement that Obama's executive action violated “the core tenets that sustain our republic.” Obama addressed these attacks in his statement.

“[For] years while I was president, I asked Congress to send me such a bill. That bill never came. And 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, my administration acted to lift the shadow of deportation from these young people, so that they could continue to contribute to our communities and our country,” Obama said in his statement. “We did so based on the well-established legal principle of prosecutorial discretion, deployed by Democratic and Republican presidents alike, because our immigration enforcement agencies have limited resources, and it makes sense to focus those resources on those who come illegally to this country to do us harm. Deportations of criminals went up. Some 800,000 young people stepped forward, met rigorous requirements, and went through background checks. And America grew stronger as a result.”

Obama added: “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. What if our kid’s science teacher, or our friendly neighbor turns out to be a ‘dreamer?’ Where are we supposed to send her? To a country she doesn’t know or remember, with a language she may not even speak?”

Obama noted that a majority of Americans support DACA, as polling has shown that a majority of both Democrats and Republicans are in favor of allowing young undocumented immigrants to stay, and he urged members of Congress “to protect these young people and our future.”

“Ultimately, this is about basic decency,” Obama said. “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.”

David Nakamura contributed to this post.