Former President Barack Obama criticized the Trump administration for once again casting a shadow of deportation over young people who were brought to the country illegally as children.

Obama renewed his call for Congress to grant permanent protection to these so-called DREAMers.

"To target these young people is wrong, because they have done nothing wrong," Obama wrote in a Facebook post. "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."

The former president rarely criticizes his successor in public. But Obama has weighed in occasionally when Trump acted to reverse one of his signature initiatives, such as the Affordable Care Act or the Paris climate agreement.

Trump's decision to phase out protection for DREAMers, beginning in six months, drew a similar response. Obama rejected the administration's claim that its action was driven by a legal challenge from conservative states.

"Let's be clear," Obama said. "The action taken today isn't required legally. It's a political decision and a moral question."

Obama himself acknowledged back in 2012 that granting DREAMers a temporary reprieve from deportation was an imperfect substitute for legislation.

"This is not amnesty," he said at the time. "This is not immunity. This is not a path to citizenship. It's not a permanent fix."

Obama had turned to executive action reluctantly after legislation known as the DREAM Act was stymied by a Republican filibuster in the Senate in late 2010. One of the bill's most outspoken opponents was then-Sen. Jeff Sessions.

"American people did not vote for an amnesty in this past election," said the Alabama Republican, now Trump's attorney general, who made the policy announcement Tuesday. "It will be resisted with every strength and every ability that I have to do so. Because this is a lame-duck Congress, it will not pass next year, and it's not going to pass this year if I have anything to do about it."

With the DREAM Act stalled, Obama eventually decided to move on his own, granting the DREAMers a temporary reprieve from deportation. Young people who met certain criteria were allowed to apply for temporary legal status and a work permit.

The move was controversial from the beginning. Even as he was announcing the program in the White House Rose Garden, Obama was interrupted by a writer from the conservative Daily Caller website.

"Why do you favor foreigners over Americans?" asked Neil Munro, a question that would foreshadow Trump's "America First" rhetoric.

Roy Beck, head of the group Numbers USA, which favors limited immigration, worried that giving work permits to DREAMers would cost native-born residents jobs.

"Is there anybody in America who believes that the 20 million unemployed or underemployed Americans need more competition?" Beck asked in 2012.

The unemployment rate at the time was 8.2 percent. It's since been cut nearly in half to 4.4 percent, despite the DREAMers' presence.

Nevertheless, Sessions argued Tuesday that Obama's order had "denied jobs to hundreds of thousands of Americans by allowing those same illegal aliens to take those jobs."

Obama rejected that sentiment five years ago.

"It makes no sense to expel talented young people who, for all intents and purposes, are Americans," he said in 2012. ""These young people are going to make extraordinary contributions, and are already making contributions to our society."

Obama echoed that sentiment Tuesday in his Facebook post.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.