Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Justice Department announced on Tuesday it is ending DACA, the Obama-era program that allowed undocumented immigrants who came to the U.S. as children to remain in the country, while also giving Congress a six-month window to possibly save the policy.

Under the plan, announced by Attorney General Jeff Sessions, the Trump administration will stop considering new applications for legal status dated after Tuesday, but will allow any DACA recipients with a permit set to expire before March 5, 2018, the opportunity to apply for a two-year renewal if they apply by October 5.

The Department of Homeland Security will recognize DACA authorizations until they expire at the end of their two-year lifespans, which means the program runs out at different times for different recipients, senior DHS officials said. The last authorization would end March 5, 2020.

Trump, in a lengthy statement issued after Sessions' remarks, said it was "in the best interests of our country" to "begin an orderly transition and wind-down of DACA, one that provides minimum disruption."

"In effect," the president said, "I am not going to just cut DACA off, but rather provide a window of opportunity for Congress to finally act."

"We will resolve the DACA issue with heart and compassion — but through the lawful democratic process — while at the same time ensuring that any immigration reform we adopt provides enduring benefits for the American citizens we were elected to serve," Trump said.

Trump also said he has advised the Department of Homeland Security "that DACA recipients are not enforcement priorities unless they are criminals, are involved in criminal activity, or are members of a gang."

Meanwhile, Sessions repeatedly referred to DACA as unconstitutional and criticized it as "unilateral executive amnesty." He said it "yielded terrible humanitarian consequences" and had "denied jobs to hundreds of thousands of Americans by allowing those same jobs to go to illegal aliens."

Related: Trump Explains Decision to Kill DACA

"We are a people of compassion and we are a people of law. But there is nothing compassionate about the failure to enforce immigration laws," Sessions said.

"The compassionate thing is to end the lawlessness, enforce our laws, and, if Congress chooses to make changes to those laws, to do so through the process set forth by our Founders in a way that advances the interest of the nation," he continued.

The decision could affect as many as 800,000 Dreamers, as participants in the program are known, who have signed up for the program since its 2012 inception. Immigrant rights advocates have said 200,000 more have sought legal status through DACA, which stands for Deferred Action for Childhood Arrivals, since Trump became president.

There are approximately 154,000 individuals with DACA expiration dates between now and March 5, 2018, Homeland Security spokesman David Lapan said. Under the plan announced Tuesday, those people would have just one month, until October 5, to apply for renewal, a tight deadline that is likely to present a major logjam as the U.S. processes the applications.

Trump’s decision indicates he’s moving ahead with his hardline immigration campaign promises — despite multiple walk-backs from him on the issue of DACA — and came on the same day that Republican officials from 10 states had set as a deadline for the administration to end the program.

Those officials had said they would sue the administration over DACA if Trump hadn’t ended it by Sept. 5. Led by Texas Attorney General Ken Paxton, the group said the government should stop accepting DACA renewal applications, allowing those now in effect to continue until their two-year period expires.

Signaling quick action, the Department of Homeland Security said Tuesday that it had already begun moving ahead with an "orderly wind-down of the program," issuing a memo formally rescinding the Obama memo that had created it.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: What Is DACA? Here’s What You Need to Know About the Program

"The Department of Justice has carefully evaluated the program’s Constitutionality and determined it conflicts with our existing immigration laws," Acting DHS Secretary Elaine Duke said.

Duke said that the option chosen by Sessions would "limit disruption to current DACA beneficiaries while providing time for Congress to seek a legislative solution."

Trump, for his part, appeared to pressure Congress to do just that in an early-morning Tweet Tuesday.

"Congress, get ready to do your job - DACA!" he posted ahead of Sessions’ announcement, as lawmakers were returning after their August break.

Congress, get ready to do your job - DACA! — Donald J. Trump (@realDonaldTrump) September 5, 2017

In brief remarks at the White House hours later, Trump also maintained he had "a great heart for the folks we're talking about."

"A great love for them," he said as he called on Congress to act on the program within the next six months.

Trump tweeted again about the issue on Tuesday night, indicating that he would step in if Congress failed: "Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do). If they can't, I will revisit this issue!"

Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do). If they can't, I will revisit this issue! — Donald J. Trump (@realDonaldTrump) September 6, 2017

The president's decision touched off protests across the U.S. and was met with a flurry of criticism from Democratic leaders, including former President Barack Obama.

"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," Obama said in a lengthy Facebook post. "And it is cruel."

"Let’s be clear: the action taken today isn’t required legally," he added. "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."

Senate Minority Leader Chuck Schumer, D-N.Y., in a speech from the Senate floor, slammed Trump's decision, saying "the human and economic toll of rescinding DACA will be far reaching," and that he believed that Sessions made the announcement instead of Trump because Trump "is probably ashamed of his decision."

House Minority Leader Nancy Pelosi, D-Calif., meanwhile, ripped Trump’s decision as a "deeply shameful act of political cowardice and a despicable assault on innocent young people in communities across America."

Several prominent Republicans expressed support for the administration’s legal rationale for rescinding DACA, but also signaled they wanted to see the program continue in some form through congressional action.

House Speaker Paul Ryan, R-Wis., who urged Trump last week to keep the program and allow Congress to fix it, criticized DACA on Tuesday, calling it "an attempt to create law out of thin air."

"It is my hope that the House and Senate, with the president’s leadership, will be able to find consensus on a permanent legislative solution that includes ensuring that those who have done nothing wrong can still contribute as a valued part of this great country," Ryan said.

Senate Majority Leader Mitch McConnell, R-Ky., said that Congress would "continue working on securing our border and ensuring a lawful system of immigration that works," while Sen. Jeff Flake, R-Ariz., a frequent Trump critic, tweeted that, "The ball is back in Congress’ court where it belongs, and there are a lot of innocent kids counting on Congress to do its job."

Business leaders were also outspoken in their criticism of Trump’s move, with several members of the Business Roundtable, a prominent group of executives, slamming the decision.

“America is and always has been a country of immigrants. We should do everything in our power to continue to attract the best and brightest because they make us stronger as a people and as an economy," JPMorgan Chase & Co. Chairman and CEO Jamie Dimon, who is also the chairman of the Business Roundtable, said. “And, when people come here to learn, work hard and give back to their communities, we should allow them to stay in the United States.”

At least one Hispanic Trump ally protested the decision, too.

Javier Palomarez, president and CEO of the U.S. Hispanic Chamber of Commerce, resigned from the National Diversity Coalition for Trump over the move, calling it “inhumane,” “economically harmful” and “disgraceful.”

In New York, Cardinal Timothy Dolan said, "This is contrary to the spirit of the Bible and of our country, and a turning away from the ideals upon which our beloved country was founded."

During the White House briefing, Secretary Sarah Huckabee Sanders countered that it "not cold-hearted for the president to uphold the law." She suggested the White House had “confidence Congress will step up and do their job."

Obama created DACA through an executive order in 2012 for people without serious criminal histories who were younger than 16 when they came to the United States before 2007.

The program allows eligible young people to seek DACA protection for renewable two-year periods. Applicants can file when they turn 15, and immigration experts say the program could end up covering 1.3 million young people if it were allowed to continue. Requests for renewals are now being filed at the rate of about 8,000 a week.

Trump, who as recently as Friday had said, "We love Dreamers, we love everybody...the Dreamers are terrific," remained in meetings at the White House on Tuesday, while Sessions made the announcement Tuesday about DACA’s future.

Sessions had made no secret of his support for ending DACA and booting Dreamers from the U.S.

When asked about DACA during his confirmation hearing in January, Sessions said, "it would certainly be constitutional, I believe, to end that order" and that he "would have no objection to a decision to abandon that order."

In April, he said, "We can't promise people who are here unlawfully that they're not going to be deported."

Trump, on the other hand, had been all over the map on the topic.

During the 2016 campaign, Trump said he would cancel DACA, vowing to "immediately terminate" the policy.

And in an August 2015 interview with NBC's Chuck Todd on "Meet the Press," Trump said DACA recipients "have to go."

But in late April 2017 he sent a different message, telling The Associated Press that young people covered by the program could "rest easy" because his administration was “not after the Dreamers, we are after the criminals."

"This is a case of heart," he said.