One day after the Supreme Court handed the Trump administration a defeat in his bid to end the Obama-era Deferred Action for Childhood Arrivals (DACA) program, Press Secretary Kayleigh McEnany said the White House was looking to find a “compassionate” way to address the DACA issue.

“You had all of the justices saying that President Trump was essentially right on the law on DACA,” the press secretary said. “In the majority opinion you had, ‘The dispute before the court is not whether DHS may rescind DACA, all parties agree that it may be rescinded. The dispute is about primarily the procedure the agency followed in doing so.’ So in other words, President Trump was right on the law here. It was unlawful the way President Obama went about this.

“Were looking at documents currently and we’re going to move forward with this in a responsible way,” McEnany added. “We want to find a compassionate way to do this.”

TRUMP SAYS ADMINISTRATION SUBMITTING NEW FILES ON DACA

Hours earlier, President Trump signaled he intends to renew his push on DACA, the executive order signed by Obama that gave legal protections to immigrants brought to the country illegally as children.

“The Supreme Court asked us to resubmit on DACA, nothing was lost or won,” he tweeted. “They 'punted', much like in a football game (where hopefully they would stand for our great American Flag). We will be submitting enhanced papers shortly in order to properly fulfil the Supreme Court’s ruling & request of yesterday.”

The court ruled in a 5-4 decision that the administration's decision to rescind the DACA program violated the Administrative Procedure Act (APA), which sets out rulemaking procedures for federal agencies.

In the opinion, Chief Justice John Roberts wrote that when the Trump administration rescinded DACA it "failed to consider the conspicuous issues of whether to retain forbearance" -- referring to the non-enforcement of immigration laws to remove those with DACA protection -- as well as the impact the decision would have on DACA recipients who have relied on the program.

"That dual failure raises doubts about whether the agency appreciated the scope of its discretion or exercised that discretion in a reasonable manner," Roberts wrote, noting that the administration could have scrapped the benefits provided by DACA while keeping the non-enforcement policy, but instead eliminated all of it without even giving a reason for ceasing non-enforcement.

"The appropriate recourse is therefore to remand to [the Department of Homeland Security] so that it may consider the problem anew," he said.

While Trump has since 2016 indicated he wants to repeal the DACA order, he has said he wants to extend the protections it allows for into law as part of a broader immigration deal.

TRUMP CALLS FOR 'NEW JUSTICES' AFTER SUPREME COURT RULING ON DACA 

McEnany said the president wants a “measured response” on DACA and has previously offered deals to Democrats for a pathway to citizenship for those brought to this country illegally as children that have been rejected. She said it is “despicable” that “Democrats seem to be using DACA recipients as pawns.”

CLICK HERE TO GET THE FOX NEWS APP

House Speaker Nancy Pelosi on Thursday said Congress still wants to pursue immigration legislation.

“Our Dreamers need and deserve real, permanent action by the Congress to ensure that they can continue to bless, enrich and strengthen our nation. The House will continue to be relentless in demanding that the Senate take up H.R. 6, the American Dream and Promise Act, to provide a pathway to citizenship for Dreamers and TPS and DED recipients. House Democrats will always work to fix our broken immigration system and to fight for our Dreamers, to ensure that America remains a nation of hope, freedom and opportunity for all.”

Fox News' Adam Shaw contributed to this report.