President Donald Trump on Wednesday said he had "no second thoughts" about ending an Obama-era policy shielding hundreds of thousands of young people from deportation, just hours after he said he would "revisit" the issue if Congress cannot legalize it within six months.

In a Tuesday night tweet, the president said he will "revisit" the Deferred Action for Childhood Arrivals program if Congress cannot reach a legislative solution.

It is unclear what action Trump would take if he decided to again address DACA. His tweeted comment on Tuesday night appears to cloud his view on the issue after a day in which he and his administration vehemently criticized President Barack Obama's authority to implement the policy.

Trump tweet: 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!

The tweet came hours after Trump announced the decision to rescind DACA, but with a six-month delay to give Congress time to act.

Trump's decision set up a potential rush for lawmakers to pass a bill protecting so-called dreamers before the Trump administration's deadline. It is unclear if the GOP-led Congress, members of which voted to sink similar legislation in the past, can do so in the near future, given its already crowded agenda for crucial legislation.

In a statement earlier Tuesday, Trump said he looks forward "to working with Republicans and Democrats in Congress to finally address all of these issues in a manner that puts the hardworking citizens of our country first."

"As I've said before, 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. We must also have heart and compassion for unemployed, struggling, and forgotten Americans," Trump said.

Trump allies like Attorney General Jeff Sessions urged him to end DACA, arguing it will be difficult to defend in court.

"Simply put, if we are to further our goal of strengthening the constitutional order and rule of law in America, the Department of Justice cannot defend this overreach," Sessions said Tuesday in announcing the move.

Scrapping DACA, which started in 2012 under Obama, could affect roughly 800,000 people registered under the program. DACA gives immigrants who were brought to America as children a two-year period of protection from deportation and allows them to work in the United States.