After months of uncertainty, President Trump will announce on Tuesday that he is ending a controversial program that protects nearly 800,000 young undocumented immigrants from deportation, media reports indicated late Sunday.

Politico and Reuters, citing unnamed sources, reported that Trump had decided to end the Deferred Action for Childhood Arrivals Program, known as DACA, which Trump inherited from President Barack Obama.

Reuters, citing sources familiar with the situation, said Trump will give Congress six months to craft a bill to replace DACA. But a senior White House aide told Politico that John Kelly, Trump's chief of staff, “thinks Congress should’ve gotten its act together a lot longer ago.”

Attorney General Jeff Sessions helped persuade the president to terminate the program, Politico reported, but White House aides cautioned that “nothing is set in stone” until an official announcement has been made. The White House could still change its mind.

The White House informed House Speaker Paul Ryan of the president’s decision on Sunday morning, Politico reported, citing a source close to the administration.

It's not clear from the reports how the six-month delay would work or whether or not Congress will act in that time period.

Ending DACA would fulfill a campaign promise that is sure to please Trump's supporters but terrify DREAMers — immigrants illegally brought to the United States as children — whose lives will be upended.

Reaction Sunday night was swift: Sen. Bernie Sanders, I-Vt., tweeted: "If Trump decides to end DACA, it will be one of the ugliest and cruelest decisions ever made by a president in our modern history."

More:Democrats take to Twitter to react to reports of Trump ending DACA

Sanders added that if Trump ends DACA, Congress must act immediately to restore it. "Taking legal protections away from 800,000 young people raised in this country is absolutely counter to what we stand for as a nation," he said.

U.S. Rep. Joaquin Castro, D-Texas, said: "For all the members of Congress over the past 5 years who said DACA should've been done 'legislatively' here's your chance. #DefendDACA."

Although Trump has taken a clear stand against illegal immigration throughout the campaign and his presidency, he had wavered on the future of DACA. During the campaign, he vowed to end it. After winning the November election, he said he would treat DREAMers with "great heart" and said they "shouldn't be very worried."

DACA was created in 2012 by the Obama administration after several failed attempts in Congress to pass a law to protect these undocumented immigrants. While announcing the program during a speech in the Rose Garden, Obama said those DREAMers didn't make the decision to enter the U.S. illegally and shouldn't be punished as a result.

"They are Americans in their heart, in their minds, in every single way but one: on paper," Obama said. "It is the right thing to do."

The program he established grants two-year stays for undocumented immigrants brought to the United States before their 16th birthday who have attended school or joined the military and have not committed any serious crimes. It also grants them work permits. Enrollees can renew their status after each two-year period, and some are currently on their third term.

More:1,850 U.S. leaders to Trump: Don't kill DREAMer protection program

More:What is DACA?

The program was created through a memorandum from the Department of Homeland Security, which means it could be rescinded at any time without any input from Congress. That was always a concern of applicants, who knew their protections could be taken away by a future president and the personal information they provided could be used to arrest and deport them.

Obama later tried to expand the number of undocumented immigrants he could protect from deportation. In 2014, he proposed a new program that would extend similar protections to undocumented immigrants whose children were born in the U.S. and thus are citizens.

That's when Republicans decided to fight back. Republican leaders from 25 states sued in court to block the deportation program for adults, convincing a federal judge in Texas to halt the program two days before it was to go into effect. The Department of Justice appealed that ruling up to the Supreme Court, but a 4-4 split left the lower court's ruling intact, effectively killing the program for adults.

With Trump in office, those Republican leaders assumed Trump would move quickly to end DACA. As the months dragged on, they grew impatient. Republican leaders from 10 states, led by Texas Attorney General Ken Paxton, sent a warning to Trump: end DACA or we'll sue. They gave Trump a deadline of Sept. 5.

Kelly, the president's chief of staff and his former secretary of Homeland Security, told members of the Congressional Hispanic Caucus in July that DACA would probably not survive that kind of lawsuit. He hinted that the program's days could be numbered.

A variety of groups have pleaded with the Trump administration in recent weeks to maintain the program. On Aug. 14, more than 100 law professors signed a letter to Trump insisting that DACA is perfectly legal. On Wednesday, a group of more than 1,850 governors, state attorneys general, faith leaders, police chiefs, sheriffs and civic leaders signed a statement urging Trump to keep the program.

"As the leaders of communities across the country—individuals and institutions that have seen these young people grow up in our communities—we recognize how they have enriched and strengthened our cities, states, schools, businesses, congregations, and families," the statement read. "We believe it is a moral imperative that the administration and the country know we are with them."