A D.C. Superior Court judge has sided with the California Internet company that argued that the government made an overly broad request for information about users of an anti-Trump website as part of its investigation into Inauguration Day riots.

In a Tuesday ruling, Judge Robert E. Morin said DreamHost must turn over the information but initially should redact the names of people who used the site, as well as other identifying information. If Morin later determines that there is evidence of criminal activity, the company will be directed to provide those details.

In July, D.C. prosecutors obtained a search warrant ordering DreamHost to turn over names, emails and IP addresses of users who interacted with disruptj20.org, a website that authorities say facilitated rioting on the day of President Trump's inauguration.

DreamHost, a Los Angeles-based website host and domain-name registrar that hosted disruptj20.org's domain, pushed back, arguing that the sweeping request was a violation of its users constitutional rights.

Morin has wrestled with how prosecutors could obtain information on DreamHost Web users who might have planned or participated in the Jan. 20 riots without also turning over information on users who had no involvement.

"While the government has the right to execute its warrant, it does not have the right to rummage through the information contained on DreamHost's website and discover the identity of, or access communications by, individuals not participating in alleged criminal activity, particularly those persons engaged in protected First Amendment activities," Morin, the court's chief judge, wrote in his ruling.

Prosecutors from the U.S. attorney's office in the District have filed felony rioting charges against about 200 people who they say participated in the riots. The disturbances left six police officers injured and caused tens of thousands of dollars in damage when businesses in downtown Washington were vandalized.

In his ruling, Morin required DreamHost to release all messages, records, logs and files as well as any deleted information still available to the company associated with the site between Oct. 1, 2016, and Jan. 20, 2017.

Morin required prosecutors to submit a plan as to how they will review the data. If Morin approves the plan, DreamHost will provide the data with the identifying information redacted. After prosecutors complete their review, they will have to submit to the judge an "itemized list" of information they contend is relevant to the criminal case. If Morin decidesthe information is indeed evidence of criminal activity, he will require DreamHost to turn over the users' identifying information. In addition, prosecutors will also need approval from the judge if they wish to retain any of the information.

Information that will redacted includes names, addresses, email addresses, IP addresses, and email or blog content that would identify individual users.

DreamHost executives applauded the judge's ruling. "This was our fight from the beginning. This is another victory not just for DreamHost, but for internet users around the world," Christopher Ghazarian, DreamHost's attorney, wrote in an email. A spokesman for the U.S. attorney's office declined to comment.