Former President Obama lashed out at President Trump for ending the Deferred Action for Childhood Arrivals (DACA) amnesty program, which was thought to be on shaky legal ground.

Obama ripped Trump as “cruel,” lacking “basic decency” and acting “contrary to our spirit, and to common sense.” The former president claimed DACA recipients “pose no threat” and “are not taking away anything from the rest of us.” (RELATED: Sympathetic Media Scrambles To Trot Out Shiny ‘Dreamers,’ But Forgets All The Nightmares)

“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,” Obama wrote in a lengthy Facebook post, following Attorney General Jeff Sessions’ announcement that the administration would be gradually rolling back the amnesty program. (RELATED: Cotton: DACA ‘A Mess of President Obama’s Making’)

“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?”

“Let’s be clear: the action taken today isn’t required legally. 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,” Obama claimed.

“They are that pitcher on our kid’s softball team, that first responder who helps out his community after a disaster, that cadet in ROTC who wants nothing more than to wear the uniform of the country that gave him a chance. Kicking them out won’t lower the unemployment rate, or lighten anyone’s taxes, or raise anybody’s wages.”

Obama had previously hinted that he would “weigh in” if Trump took action on DACA, despite longstanding precedent against former presidents criticizing the current president.