The Trump administration has come under harsh criticism from all sides of the US political spectrum for its move to scrap a programme that protects from deportation hundreds of thousands of undocumented immigrants who entered the United States as children.

Attorney General Jeff Sessions announced the end to the Deferred Action for Childhood Arrivals (DACA) scheme on Tuesday, angering many but also drawing some support from staunch Trump allies.

DACA has helped nearly 800,000 young people, referred to as "Dreamers", get legal status, work permits and driving licences.

The programme's fate now rests with congress members who will have six months to come to a political solution before DACA officially ends.

Late on Tuesday, Trump tweeted that he would "revisit this issue" if Congress fails to "legalise DACA" in six months.

READ MORE: With DACA scrapped, what next for 800,000 'Dreamers'?

While the move was expected for weeks, Tuesday's announcement drew strong condemnation from many throughout the US.

Barack Obama, the former US president who created DACA in 2012, called the action "cruel" and a "political decision".

"Ultimately, this is about basic decency," he said in a statement on Facebook.

"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."

To target hopeful young strivers who grew up here is wrong, because they've done nothing wrong. My statement: https://t.co/TCxZdld7L4 — Barack Obama (@BarackObama) September 5, 2017

Trump's move effectively kicks responsibility for the fate of Dreamers to his fellow Republicans who control both Houses of Congress. Members of Congress, however, have been unable to pass any major legislation since the president took office in January and the body has been bitterly divided over immigration in the past.

Obama bypassed Congress and created DACA through an executive order.

READ MORE: Texas police arrest DACA recipients in Austin protest

Lorella Praeli, director of immigration policy at the American Civil Liberties Union (ACLU), said the decision throws the lives and futures of Dreamers into "disarray".

"Today is a cruel day for Dreamers, our families and all Americans," she said in a statement.

"President Trump just threw the lives and futures of 800,000 Dreamers and their families, including my own, into fearful disarray, and injected chaos and uncertainty into thousands of workplaces and communities across America," she added.

"He is using the lives of 800,000 people as pawns."

Criticism within the Republican party

Trump's move also brought about criticism from some within his own party.

Republican Senator John McCain called the president's move "the wrong approach".

.@POTUS's decision on #DACA is wrong approach at a time when both sides need to compromise on #immigration reform https://t.co/kPBCUhJ2m4 pic.twitter.com/5stY5spxOC — John McCain (@SenJohnMcCain) September 5, 2017

Republican Senator Jeff Flake urged Congress to "act immediately" and "pass permanent, stand-alone legislation to lawfully ensure that children who were brought [to the US] ... are able to stay".

And Illeana Ros-Lehtinen, a Republican Congresswoman from Florida, said Trump was "wrong on the DACA termination".

"The decision by the administration to end DACA and shut down the dreams of young immigrants is heartbreaking, reckless and wrong," she said in a statement.

Legal support

Some of the strongest critics have come from within the tech and business industries, which have hired a number of Dreamers.

"This is a sad day for our country," Mark Zuckerberg, chief executive officer (CEO) of Facebook, said in a post on the social media platform.

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

Tech giant Microsoft has offered to pay for the legal counsel of any Dreamers who work for the company and may face deportation.

Its CEO, Brad Smith, called Trump's move "a big step back for our entire country".

Apple CEO Tim Cook said 250 Apple employees are Dreamers who "deserve our respect as equals and a solution rooted in American values".

#Dreamers contribute to our companies and our communities just as much as you and I. Apple will fight for them to be treated as equals. — Tim Cook (@tim_cook) September 5, 2017

Online, #DACA trended worldwide, while "Dreamers" was among the top Twitter hashtags in the US, with many expressing support for DACA recipients.

Incredible how we punish people to just want to belong to this country#DACA — rabia chaudry (@rabiasquared) September 5, 2017

When #DACA is repealed, 800,000 undocumented youth will lose their ability to work. But they are courageously resisting #SinDacaSinMiedo pic.twitter.com/Jj3I14Hyz4 — Eric Dirnbach (@EricDirnbach) September 5, 2017

Some students, many of whom headed back to school on Tuesday, walked out of class to protest Trump's move.

#Breaking: Students at Denver schools are walking out of classes in protest of #DACA announcement

WATCH: https://t.co/fYKBG4jvCA pic.twitter.com/ErH0Hz86oq — Channel 2 KWGN (@channel2kwgn) September 5, 2017

And protests were held in major cities across the country, including New York City, where activists say at least nine DACA recipients were arrested at a sit-in.

30 DACAmented immigrants & allies arrested outside Trump Tower today. #SinDACASinMiedo Resist with them: https://t.co/TJMAEzP1G1 pic.twitter.com/QyGtEcSlam — Movimiento Cosecha (@CosechaMovement) September 5, 2017

"Move Trump, Get Out of the Way," reverberates at the defend #DACA protest in Washington DC! pic.twitter.com/Kuc2FrUJly — Parth Vohra (@parthvohra622) September 5, 2017

(Thread) In response to DACA's repeal, a Pro #DACA rally has started in Downtown LA pic.twitter.com/Lx3Fehwbl9 — KCRW (@kcrw) September 5, 2017

'Unconstitutional'

Trump's move though does have some level of support, particularly from his closest allies, who have called Obama's creation of the DACA programme "unconstitutional".

Many Republicans who reacted to Tuesday's decision chose to focus on its creation by Obama, instead of the programme itself.

Paul Ryan, the top Republican in the House who had previously urged the president to keep the programme intact, praised Trump's move, calling the creation of DACA "a clear abuse of executive authority".

He added, however, that he hopes Congress "will be able to find consensus on permanent legislative solution that includes ensuring that those who have done nothing can still contribute as a valued part of this great country".

READ MORE: American dream fades for child immigrants under Trump

Mitch McConnell, the top Republican in the Senate, said that Trump's action to scrap the programme corrects a "fundamental mistake".

"President Obama wrongly believed he had the authority to re-write our immigration law," McConnell said in a statement. "Today's action by President Trump corrects that fundamental mistake".

And Republican Senator Ron Johnson, who is the chairman of the Homeland Security and Governmental Affairs Committee, echoed McConnell.

"DACA was an unconstitutional overreach by the Obama administration that created incentives for children from Central America to take great risks to enter America illegally," he said.

The Trump administration said no current beneficiaries of the programme would be affected before March 5.