SACRAMENTO (CBS) — California leaders were quick to call Thursday’s Supreme Court ruling upholding the Deferred Action for Childhood Arrivals (DACA) program a victory.

In a 5-4 ruling, the high court provided a lifeline to nearly 700,000 immigrants whose future in the United States hung in the balance while a yearslong legal battle moved through the courts.

READ MORE: Roseville Police Investigating A Fight That Turned Fatal

Chief Justice John Roberts delivered the majority opinion for the court. He wrote that the Trump administration’s decision to try and dismantle the Obama-era program was “arbitrary and capricious” under the Administrative Procedure Act.

Roberts noted that the Department of Homeland Security should revisit the program.

Still, many leaders called the decision an important step in protecting “Dreamers” from deportation.

“Today’s decision is an important victory, for now, for the hundreds of thousands of Dreamers — including over 200,000 Californians — who contribute deeply to their communities each day,” said California Gov. Gavin Newsom in a statement on the ruling.

READ MORE: These Are The Places With The Highest Wildfire Risk In The US

Attorney General Xavier Becerra also applauded the decision.

“The highest court in our land saw through the Trump Administration’s illegal, baseless excuses,” Becerra said in a statement.

Newsom pushed for a permanent solution to the issue, noting that a pathway to citizenship for Dreamers was not enough.

“This moment reminds us we are confronting the systemic injustice and racism that exists within our nation and institutions. We will fight for everyone to be treated with dignity and respect,” Newsom said.

President Trump tweeted that the decision on DACA and LGBTQ protections earlier in the week were “shotgun blasts into the face of people that are proud to call themselves Republicans or Conservatives.”

MORE NEWS: ‘Community Murals Sacramento’ Program Brings Art And Culture To The City

Reporting from contributed to this article.