WASHINGTON (Reuters) - President Donald Trump on Tuesday scrapped an Obama-era program that protects from deportation immigrants brought illegally into the United States as children, delaying implementation until March and giving a gridlocked Congress six months to decide the fate of almost 800,000 young people.

As the so-called Dreamers who have benefited from the five-year-old program were plunged into uncertainty, business and religious leaders, mayors, governors, Democratic lawmakers, unions, civil liberties advocates and former Democratic President Barack Obama all condemned Trump’s move.

The action was announced not by Trump but by Jeff Sessions, his attorney general, who called the Deferred Action for Childhood Arrivals (DACA) program an unconstitutional overreach by Obama. There will be an “orderly, lawful wind-down,” Sessions said.

Trump later issued a written statement saying that “I do not favor punishing children, most of whom are now adults, for the actions of their parents. But we must also recognize that we are (a) nation of opportunity because we are a nation of laws.”

He denounced Obama’s program as an “amnesty-first approach” toward illegal immigrants and pressed his nationalist “America First” message, saying that despite concerns voiced by his critics about the fate of the Dreamers, “Above all else, we must remember that young Americans have dreams too.”

On Tuesday evening, the Republican president tweeted that lawmakers now had six months to “legalize DACA” and that if they did not, he would “revisit this issue!”

Obama issued his own statement calling Trump’s action a political decision, defending DACA’s legality and urging Congress to protect Dreamers.

“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. These Dreamers are Americans in their hearts, in their minds, in every single way but one: on paper,” Obama said.

The Trump administration said nobody covered by the program, which provided work permits in addition to deportation protection and primarily benefits Hispanics, would be affected before March 5. Most people covered by DACA are in their 20s.

Trump shifted responsibility to a Congress controlled by his fellow Republicans and said it was now up to lawmakers to pass immigration legislation that could address the fate of those protected by DACA who would be in danger of deportation.

Trump and Sessions offered no details of the type of legislation they would want to see, and Trump’s spokeswoman offered only a broad outline.

“I have a love for these people (DACA recipients), and hopefully now Congress will be able to help them and do it properly,” Trump later told reporters at the White House, adding: “I think it’s going to work out very well.”

Since Trump took office in January, Congress has been unable to pass any major legislation, most notably failing on a healthcare overhaul, and lawmakers have been bitterly divided over immigration in the past.

“President Trump’s decision to end DACA is a deeply shameful act of political cowardice and a despicable assault on innocent young people in communities across America,” said Nancy Pelosi, the top Democrat in the House of Representatives.

The Democratic attorney general of Massachusetts, Maura Healey, said a coalition of states planned to file suit in the coming days to defend DACA, and one advocacy group announced its own legal action.

"This is a sad day for our country," added Facebook Inc FB.O founder Mark Zuckerberg. "The decision to end DACA is not just wrong. It is particularly cruel to offer young people the American Dream, encourage them to come out of the shadows and trust our government, and then punish them for it."

Brad Smith, president of Microsoft Corp MSFT.O, urged Congress to "put the humanitarian needs of these 800,000 people on the legislative calendar" before tax-cut legislation sought by Trump.

Slideshow ( 30 images )

Nearly 800,000 people stepped forward, admitted their illegal immigrant status and provided personal information to the government to apply for the DACA program. They now face the prospect of being deported starting in March. Dreamers are a fraction of the roughly 11 million illegal immigrants in the United States.

“The cancellation of the DACA program is reprehensible,” the U.S. Conference of Catholic Bishops said in a statement.

But White House spokeswoman Sarah Sanders said: “It’s not cold hearted for the president to uphold the law.”

Trump said DACA recipients would not be deportation priorities unless they were criminals or gang members.

Slideshow ( 30 images )

Ending DACA was the latest action by Trump sure to alienate Hispanic Americans, a growing segment of the U.S. population and an increasingly important voting bloc. Most of the immigrants protected by DACA came from Mexico and other Latin American countries.

The Mexican government said it “profoundly laments” Trump’s decision to end DACA and pledged to strengthen efforts to guarantee consular protections for affected Mexican citizens.

THREAT OF LAWSUITS

The Homeland Security Department will provide a limited window - until Oct. 5 - for some DACA recipients whose work permits expire before March 5 to apply to renew those permits. In addition, the department will adjudicate any new DACA requests, or renewal requests, accepted as of Tuesday. That would mean that some beneficiaries of DACA could work legally in the country through 2019.

The administration said the president’s decision was prompted in part by a threat from several Republican state attorneys general, led by Texas, to file legal challenges in federal court if Trump did not act to end DACA. Late on Tuesday, Texas state Attorney General Ken Paxton said he withdrew the 10-state suit after Trump’s decision.

House Speaker Paul Ryan called on lawmakers to find a long-term solution for the young people affected by the reversal of the program. Republican Senate Majority Leader Mitch McConnell said Congress “will continue working on securing our border and ensuring a lawful system of immigration that works.”

Republican Senator Lindsey Graham said there could be a winning formula by coupling legislation to provide legal status for Dreamers with additional border security measures, although he said support was lacking in Congress for Trump’s proposed border wall.

Trump made a crackdown on illegal immigrants a centerpiece of his 2016 election campaign, promising to deport every illegal immigrant.

The decision to end DACA is the latest action by Trump to erase key parts of his Democratic predecessor’s legacy.

That includes pulling the United States out of the Paris climate accord, abandoning a 12-nation Pacific trade deal, seeking to dismantle the Obamacare healthcare law, rolling back environmental protections, reversing parts of Obama’s opening to Cuba and removing protections for transgender people.