The Supreme Court ruled Thursday that a California law requiring nonprofits to reveal the names of their major donors to the government is "facially unconstitutional." 

The 6-3 ruling came on the final day of a term that has seen the justices take a noticeably unified approach to a number of hot-button issues. But on the final day of the term, the court issued two rulings divided along ideological lines. Chief Justice John Roberts was joined by the five other Republican-appointed justices in siding with the conservative nonprofit groups that challenged the California law.

"We do not doubt that California has an important interest in preventing wrongdoing by charitable organizations," Roberts wrote in the leading opinion. "There is a dramatic mismatch, however, between the interest that the Attorney General seeks to promote and the disclosure regime that he has implemented in service of that end."

Chief Justice John Roberts smiles for the cameras as the nine members of the Supreme Court pose for a new group photograph on October, 08, 2010 in Washington, DC. (Photo by Bill O'Leary/The Washington Post via Getty Images)

SUPREME COURT UPHOLDS ARIZONA VOTER FRAUD PROTECTIONS

The conservative groups who sued against the California law – Americans for Prosperity Foundation and the Thomas More Law Center – said that the First Amendment's protection of freedom of association because the disclosure requirements created a "chilling effect" on speech and "actual and potential" donations. California, meanwhile, said it asks charities to submit their IRS 990 Schedule B forms to the state for critical law enforcement purposes and that the forms will not be made public, so there is therefore no reason to worry about chilling speech. 

The court sided with the conservative groups, saying that such disclosure requirements infringe on the First Amendment. 

"Our cases have said that disclosure requirements can chill association'[e]ven if there [is] no disclosure to the general public," Roberts wrote. "While assurances of confidentiality may reduce the burden of disclosure to the State, they do not eliminate it." 

Justice Sonia Sotomayor led the dissent. She said the nonprofits did not sufficiently prove that their donors were at risk of harassment or public disclosure, and warned that the court's decision could harm future regulatory efforts. 

The court, Sotomayor said, "discards" its typical requirement "that plaintiffs demonstrate an actual First Amendment burden before demanding that a law be narrowly tailored to the government’s interests, never mind striking the law down in its entirety."

Associate Justice Sonia Sotomayor poses in the official group photo at the US Supreme Court in Washington, DC on November 30, 2018. Sotomayor lead the dissent to a Thursday Supreme Court decision striking down a California law that required nonprofits to disclose their largest donors to the state.  (MANDEL NGAN/AFP via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"Today’s analysis marks reporting and disclosure requirements with a bull’s-eye," she added. "Regulated entities who wish to avoid their obligations can do so by vaguely waving toward First Amendment  'privacy concerns.'"

The opinion follows the court releasing its decision on a challenge to Arizona's election laws Tuesday and marks the end of its 2020-2021 term. And it comes at the height of speculation that Justice Stephen Breyer could step down, potentially opening a Supreme Court seat for President Biden to fill. 

Most experts expect that announcement to come before the end of the week or else Breyer is likely to stay on for the court's next term, which begins in October.