Prosecution argued that confidential form contradicts testimony.

BARNSTABLE — The prosecutor in a Hyannis murder case may obtain a copy of a document considered confidential by the state attorney's general's office, a judge ruled Wednesday.

Thomas Flanagan, an assistant district attorney in the Suffolk County District Attorney’s Office, previously filed a motion asking the court to order the attorney general’s office to produce a copy of a form filled out by a surviving victim in the case.

Kelly Ridley Jr., 20, of Hyannis, is charged with one count of murder and two counts of assault and battery with a dangerous weapon in connection with the killing of 26-year-old Thomas Russell Jr. at a Hyannis party Oct. 22, 2016.

Ridley allegedly punched Russell, who was known to friends and family as "Teezy," struck him in the back with a scooter and stabbed him four to five times. Ridley also allegedly stabbed a resident of the house where the party was held, Michael James, who survived.

Ridley pleaded not guilty to the charges in January.

Flanagan is prosecuting the case to avoid the appearance of a conflict of interest because a relative of Russell’s works at the Cape and Islands District Attorney’s Office.

James submitted an application to the attorney general’s Victim Compensation and Assistance Division, a program that provides financial assistance to victims of violent crimes, and wrote on the application that Ridley stabbed him, Flanagan said.

This information contradicts testimony that James gave before the grand jury that indicted Ridley. James, who has a close relationship with Ridley, testified then that he did not know who stabbed him, Flanagan said.

But according to state regulations, all information obtained by the Victim Compensation and Assistance Division in connection with a claim for compensation must be kept confidential.

"This is a confidential document," Assistant Attorney General Todd Blume said.

Flanagan said in most instances he would agree, but he argued this was a special circumstance that warranted release of the document.

"In the vast majority of these cases the district attorney’s office is on the same page as the attorney general’s office," he said.

When asked how prosecutors knew what was written in the confidential application, Blume said a member of the assistance division disclosed the information to a victim witness advocate with the district attorney's office in response to a question but did not hand over the document.

That "doesn't say much for your confidentiality," Barnstable Superior Court Judge Gary Nickerson said.

Nickerson ruled to allow release of the document and ordered that the prosecutor and the defendant receive a copy.

"What is at stake here is the right to a fair trial both on the part of the commonwealth and the defendant (as well as the right of the deceased victim’s family to due process)," Nickerson wrote on the motion document.

— Follow Madeleine List on Twitter: @madeleine_list.