The Boston Police Department has until 2 p.m. Friday to furnish all documents related to a 2005 sexual assault case to Boston City Councilor and Suffolk County District Attorney candidate Ricardo Arroyo, a judge ordered Thursday evening.

Arroyo, who faces interim DA Kevin Hayden in an acrimonious competition for the Democratic nomination to the DA’s seat, recently came under scrutiny after the Boston Globe reported that he was the focus of a pair of sexual assault investigations as a teenager in 2005 and 2007.

The woman in the 2007 case has since said, through an attorney, that Arroyo did not assault her. Arroyo sought the 2005 case documents, which he claims will show how investigating authorities determined the accusations against him were “unfounded.”

The ruling came after attorneys for the City of Boston and the woman who said Arroyo assaulted her in high school in 2005 argued in state court Thursday against the release of documents related to the investigation, saying to make the papers public would violate the state law intended to protect victims' privacy, retraumatize the victim and cast a chilling effect on other sexual assault victims.

After about 40 minutes of hearing arguments, Judge Debra A. Squires-Lee told both parties Thursday she would privately review the case file and determine by the end of the night whether any documents should be redacted and made public.

Later in the evening, Judge Squires-Lee issued her ruling, saying that although victims' privacy rights were at odds with public interest, ultimately privacy concerns would be upheld through redactions, "particularly since the nature of the allegations, at least in part, have already been widely publicized."

"This court has previously concluded that the privacy concerns of victims of alleged acts of rape or sexual assault can be protected through redacting the discoverable documents to conceal the names, addressess, social security numbers, familial relationships, and other personal identifying information," her ruling said. "Boston has not shown why a similar approach would be inadequate here."

Earlier in the day, Arroyo told reporters after court that it’s important for the public “to know the truth.”

“It’s clear that the Boston Police Department and the Suffolk County District Attorney’s office investigated this at the time and came to conclusions,” he said outside the courthouse. “I think it’s important for the public to know what those conclusions were. I know that those conclusions were that this case was unfounded and I think it’s important for them to be able to take these agencies at their word, not necessarily me, but what the papers say.”

Arroyo's attorney argued that the Globe’s reporting about an “unfounded allegation” within days of an election made the case a matter of public interest and put Arroyo at a disadvantage since the public lacks a full understanding of what happened in the investigation.

“He is being harmed, as you can clearly see,” said Attorney Anthony Ellison. He went on to add that Arroyo, as the subject of the documents in question, should be allowed to access them.

But attorneys for the victim and the City of Boston disagreed, pointing to the state law governing the confidentiality of reports of rape, sexual assault and domestic violence.

James Megee, the city attorney, said the law does not list people accused of such crimes as entitled to those documents. The City of Boston, Megee said, considers the entire case file “records of sexual assault.”

“The legislature didn’t envision a balancing test between victims’ privacy” and someone’s desire to have access to those records, Megee said.

Leonard Kesten, the attorney for Jane Doe, argued even redacted documents would bring harm to his client who, having nothing to do with the initial release of documents to the Globe, would suddenly become a subject of speculation and suffer.

“It would destroy this young woman,” he said. “There will be public debates about whether she’s lying.”

Outside the courthouse, Kesten told reporters it would also have a chilling effect on other victims.

“What person is going to come forward and make a complaint that they were sexually assaulted if they then know that this could be put out into the public and everybody’s going to be debating over the coffee table whether she’s lying?” said Kesten.

Judge Squires-Lee ultimately disagreed with the City and Jane Doe, saying that her private review concluded many of the documents within the BPD file "lack or substantially lack" information that would fall under the state law that governs access to victims' reports of sexual assault.

"I recognize that, to the dismay and consternation of the complaining witness, the illegal disclosure and subsequent dissemination of such confidential information precipitated this action and predictably resulted in the very harm the statute was intended to prevent," she wrote. "The parties agree the facts of this matter are unprecedented. Given the illegal and illicit disclosure and proximity to the election, the likelihood of this factual scenario recurring is virtually nil."

The City of Boston said it is reviewing the judge's decision, presumably with an eye toward an appeal.