Former president Barack Obama on Tuesday criticized President Trump's decision to end the immigration program designed to protect undocumented immigrants who were brought to the U.S. as children.

In a Facebook post, Obama asserted that the move was a "political decision, and a moral question."

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

The former president said he had asked Congress to send him an immigration bill. When that bill never came, the Obama administration decided to act by creating the Deferred Action for Childhood Arrivals program.

RELATED | Local reaction to DACA decision

"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," he said.

As young people stepped forward and deportations of criminals went up, "America grew stronger as a result," he wrote.

Now that the issue has been punted back to Congress, Obama called on its members to "protect these young people and our future."

"Ultimately, this is about basic decency," he 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. It's about who we are as a people — and who we want to be."