SAN FRANCISCO (CN) – Dissecting an outdated federal communications privacy law crafted decades before the birth of social media, California’s high court Thursday opened the door for defense lawyers to pry certain types of user content from companies like Facebook and Twitter in criminal cases.

The California Supreme Court delved into a high-profile argument between Facebook and two murder suspects over the Stored Communications Act, a 1986 law which restricts companies from disclosing private online communications without consent.

The Silicon Valley giants refused to hand over content posted by the murder victim and a witness in the San Francisco criminal case. Facebook argued that because of the privacy law – enacted when its CEO Mark Zuckerberg was a toddler – it can’t release the information without the user’s consent and that the defense attorneys need to obtain a warrant.

In this case, one user was killed and the other can’t be located.

Defense attorneys argued asking for a court order to obtain the content would alert prosecutors to their strategy. They noted Facebook and others routinely cooperate with prosecutors in criminal and civil matters.

Providing a measure of hope for the defense, the high court panel ruled companies can legally disclose posts available for all users to view, citing a provision in the act regarding “electronic communication readily accessible to the general public.”

“The committee indicated its understanding that with regard to electronic communications configured by the user to be accessible to the public, a covered service provider would be free to divulge those communications under section 2702 (b)(3)’s lawful consent exception,” wrote Chief Justice Tani Cantil-Sakauye for the panel in a unanimous decision. “Nothing in the subsequent Senate report took issue with this analysis.”

Janelle Caywood, the defense attorney in the underlying case, said she was thrilled with the high court’s ruling and called it historic. She said this was the first time a state’s high court had taken up this sort of challenge to the Stored Communications Act.

“Gaining access to this kind of content is a problem in all criminal courts across the country,” Caywood said in a phone interview. “This is the first blow to Facebook’s stonewall over user content.”

The seven-member panel remanded the dispute back to the trial court to decide whether any communications sought by the defense must be disclosed by Facebook and Twitter. The subpoenas seek “any and all public and private content” including information that may have been deleted by the users.

The matter stems from a 2013 drive-by shooting in San Francisco that killed Jaquan Rice Jr. and injured his girlfriend. Police arrested Derrick Hunter and Lee Sullivan on murder charges and a third suspect was later convicted in juvenile court.

In December 2014 ahead of the trial, the defense subpoenaed Facebook, Twitter and Instagram for social media records from the victim and a witness’ accounts. The defendants claimed Rice Jr. and witness Renesha Lee threatened violence online and the posts should be seen by a jury.

A month later, the trial judge denied the media giants’ request to quash the subpoenas, saying that the defendants had a constitutional right to the information in order to prepare for trial.

Nine months later on appeal, the San Francisco-based First Appellate District agreed with the social media sites that federal privacy laws outweigh a criminal defendant’s right to such protected media information during pretrial proceedings. But the panel left open the possibility that the defense could motion for the social media content at trial.

Either the social media companies or the defense were satisfied with the appellate decision and brought the matter to the state high court. Oral arguments were held in March with Google submitting a friend-of-the-court brief on behalf of the companies. The companies hired Gibson Dunn & Crutcher and Perkins Coie as counsel.

Facebook’s attorneys did not immediately respond to a request for comment on the decision.

San Francisco and Ventura counties’ public defenders filed briefs in support of the murder suspects, saying prosecutors and defendants should have equal access to social media content.

The high court says it will be up to the parties and the trial court to sift through the content and ultimately decide what Facebook should disclose.

“Whether any given communication sought by the subpoenas in this case falls within the lawful consent exception of section 2702 (b)(3) and must be disclosed by a provider pursuant to a subpoena cannot be resolved on this record,” the order states.

Caywood says she hopes the ruling levels the playing field and gives defense attorneys “paralleled access” to information that prosecutors often gain access to.

“Public defenders have been trying to subpoena Facebook for this type of information since 2008; this opinion gives us guidance on how to proceed,” Caywood said.