The Supreme Court's ruling against the Trump administration's effort to end the Obama-era Deferred Action on Childhood Arrivals (DACA) program –­ which offers legal protections to young immigrants brought to the country illegally as children –­ was based on a failure to follow rules and not the actual merit of the program, Fox News senior judicial analyst Judge Andrew Napolitano explained Thursday.

In a 5-4 decision, with Chief Justice John Roberts joining his liberal counterparts to author the opinion, the Supreme Court said that the administration's decision to rescind DACA violated the Administrative Procedure Act (APA), which sets out rulemaking procedures for federal agencies.

SUPREME COURT RULES AGAINST TRUMP ADMINISTRATION BID TO END DACA PROGRAM

Reacting to the decision while on "America's Newsroom" with hosts Sandra Smith and Ed Henry, Napolitano stated further that while the court is not saying whether DACA is right or wrong, it is commenting on "the manner in which the Trump administration terminated it without proposing an alternative for the 700,000 to 800,000 human beings who came here as babies and have been raised as if they were and for all practical purposes are Americans, without consideration for what will happen to them."

"So, there is a law called the Administrative Procedure Act which requires the executive branch – when it is promulgating rules – to jump through certain hoops before it promulgates those rules," he continued. "The Supreme Court here said the Trump administration failed miserably to jump through those hoops."

"We do not decide whether DACA or its rescission are sound policies. 'The wisdom' of those decisions 'is none of our concern,'" Roberts wrote in his opinion. "We address only whether the agency complied with the procedural requirement that it provide a reasoned explanation for its action."

DACA participant Gloria Mendoza and others demonstrate in support of the program, in New York City, Jan. 10, 2018.

DACA participant Gloria Mendoza and others demonstrate in support of the program, in New York City, Jan. 10, 2018. (Reuters)

The Trump administration has argued that DACA, an executive order, was established through improper means to begin with, claiming it should have been done via legislation from Congress. They also believed that the decision to eliminate DACA does not fall under the purview of the APA because DACA itself was merely a decision not to enforce existing law against a certain group of people.

The Supreme Court disagreed, noting that "DACA is not simply a non-enforcement policy" because it is an actual program where people apply to receive a benefit.

President Trump quickly reacted to the decision, saying on Twitter, "These horrible & politically charged decisions coming out of the Supreme Court are shotgun blasts into the face of people that are proud to call themselves Republicans or Conservatives."

Trump then pondered if the recent decisions were personal, asking, "Do you get the impression that the Supreme Court doesn’t like me?"

The DACA ruling came just days after an opinion from his own appointee Justice Neil Gorsuch said employment discrimination based on sexual orientation or gender identity was prohibited under Title VII of the Civil Rights Act.

Napolitano on Thursday insisted that the administration didn't follow the rules. "It didn't consider the policy implications and it didn't say what it would do when DACA was terminated," he asserted.

"Now, this goes back...to [the Department of Homeland Security]. They could start it all over again. But as [Fox News reporter] John Roberts has pointed out, they may not want to do this in an election year," he told Smith and Henry.

CLICK HERE FOR THE FOX NEWS APP

"As for the president, he has said and made it very clear: ‘If I win this case, the purpose is to negotiate with the Democrats on comprehensive immigration reform. It is not…he has said several times, to kick out of this country 800,000 young people," Napolitano remarked.

"[The] Supreme Court discounted that and said, ‘You’ve got to tell us what you’re going to do with those 800,000 young people,'" he concluded.

Fox News' Ronn Blitzer and Bill Mears contributed to this report.