FRANKFORT, Ky. — A Kentucky appeals court said Thursday that a judge presiding over a school shooting case was wrong to close the suspect's criminal arraignment to the public.

In a separate ruling this week, the state's chief justice denied a motion from prosecutors seeking to remove the same judge from the case.

Marshall County Circuit Judge James Jameson has courted controversy since the Jan. 23 deadly shooting at Marshall County High School. Local media companies have complained in court filings that Jameson closed off court proceedings for the 15-year-old charged in the shooting, Gabriel R. Parker.

The Kentucky Court of Appeals said in a ruling issued Thursday that Jameson's "reliance on statute as a basis for closing the arraignment to the public was error." Parker was arraigned on murder and assault charges on Feb. 16 but the press was not let in.

The court ordered Jameson to "refrain from closing any future proceeding in this case which is ordinarily open to the public. ..."

In the earlier ruling on whether Jameson should be removed from the case, Chief Justice John D. Minton said in an order Wednesday that he doesn't see a "disqualifying circumstance" to remove Jameson from the case.

The county prosecutor, Mark Blankenship, had argued in a motion that Jameson acted before the case was in his court by appointing a public defender for Parker.

Blankenship said the appearance of impropriety after media reports about Jameson is the main reason he wanted Minton to weigh in.

"I'm glad this issue is now resolved," Blankenship said in an email message Thursday. "Time to move the case forward with Judge Jameson presiding."

Jameson said in a court filing this week that he was approached by a public defender asking to represent Parker, who was being interviewed by police at the time. Jameson said a representative from the prosecutor's office was in the court and didn't object to the appointment.

Parker has been indicted on two charges of murder and 14 counts of assault in the shooting at the school in far western Kentucky.

In court records released Thursday, a state police detective wrote that Parker led police to the gun used in the shootings and confessed, according to media reports. Police found a weapon and shell casings and have surveillance video of the shooting.