Former Vice President Joe Biden applauded a Supreme Court ruling Thursday that rejected the push by President Trump and his administration to scrap the Obama-era program that offers legal protections to young immigrants who entered the U.S. illegally as children.

"The Supreme Court’s ruling today is a victory made possible by the courage and resilience of hundreds of thousands of DACA recipients who bravely stood up and refused to be ignored,” the presumptive Democratic presidential nominee said in a statement soon after the announcement by the high court.

SUPREME COURT RULES AGAINST TRUMP PUSH TO END DACA PROGRAM

And Biden vowed that if elected to the White House, he would “immediately work to make it permanent by sending a bill to Congress on day one of my administration."

In a 5-4 ruling – with Chief Justice John Roberts joining the four more liberal justices – the court said that the Trump administration's decision to rescind the Deferred Action on Childhood Arrivals (DACA) program violated the Administrative Procedure Act (APA), which sets out rulemaking procedures for federal agencies.

Former President Barack Obama – who set up the program in 2012 through an executive order – hailed the decision, tweeting: "Eight years ago this week, we protected young people who were raised as part of our American family from deportation. Today, I'm happy for them, their families, and all of us."

Biden, who served eight years as Obama’s vice president, noted that “the joy of today’s victory does not erase the difficult road ahead. We know that much work remains to be done. But I will continue to stand with DACA recipients, their parents, and their families at every step, and in November, joined by millions across this country, we will reject the president who tried to rip so many of our family members, friends and coworkers out of our lives."

READ THE SUPREME COURT RULING

Thursday’s ruling was the second blockbuster defeat for the president this week at the hands of the Supreme Court. The justices ruled 6-3 on Monday that discrimination based on sexual orientation or gender identity is prohibited under a more than 50-year-old landmark federal civil rights law.

“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 tweeted.

The president – in an attempt to rally his political base with less than five months to go until Election Day – then warned that “We need more Justices or we will lose our 2nd. Amendment & everything else. Vote Trump 2020!”

But he also assured, "As President of the United States, I am asking for a legal solution on DACA, not a political one, consistent with the rule of law."

Fox News’ Bill Mears, Ronn Blitzer and Madeleine Rivera contributed to this story