Idaho's Supreme Court has rejected a media coalition's appeal of the Bryan Kohberger gag order, finding that it should have been filed in a lesser court.

Kohberger is accused of killing four University of Idaho students in an early morning ambush in November. The case drew national attention, and attorneys on both sides have supported the magistrate court's order restricting comment.

"Petitioners have forgotten that we are 'the court of last resort in Idaho' – not the court of first resort," reads the 5-0 decision, written by Justice Gregory Moeller.

The court agreed that The Associated Press and other media organizations had standing but found that they "failed to meet the prerequisites for invoking its original jurisdiction," according to a summary of the order.

IDAHO STUDENT MURDERS: BRYAN KOHBERGER DEFENSE CLAIMS SURVIVING ROOMMATE HAS 'EXCULPATORY' EVIDENCE

Bryan Kohberger inset Judge Megan Marshall at bench

Latah County Magistrate Judge Megan Marshall speaks during a January 2023 hearing for Bryan Kohberger, inset, the suspect in the stabbing deaths of four students near the University of Idaho. (Kai Eiselein/Pool)

The group should have sought relief in the magistrate court that issued the gag order and only escalated their case to the Supreme Court on appeal, if necessary, according to documents released Monday.

The Idaho Supreme Court ruling covers a separate appeal from the one filed by an attorney for the family of Idaho victim Kaylee Goncalves, who asked Magistrate Judge Megan Marshall to rescind or amend her order.

Goncalves, 21, was found stabbed to death on the third floor of an off-campus rental home near the University of Idaho campus next to her best friend and roommate, Madison Mogen, on Nov. 13.

Another housemate, Xana Kernodle, 20, and her visiting boyfriend, Ethan Chapin, also 20, were killed on the second floor.

University of Idaho victims Madeline Mogen, Ethan Chapin, Xana Kernodle, and Kaylee Goncalves

The victims of Nov. 13 University of Idaho massacre, from left, Kaylee Goncalves, Ethan Chapin, Xana Kernodle and Madison Mogen. (Instagram @xanakernodle | @maddiemogen | @kayleegoncalves)

IDAHO MURDERS: BRYAN KOHBERGER LEAKS ‘HUGE ISSUE’ WITH ‘POTENTIAL TO COMPROMISE’ PROSECUTION, LAWYER WARNS

Two other roommates survived, including one who heard a commotion and told police she saw a masked man with "bushy eyebrows" after the attack.

Read the decision (Mobile users go here)

The intruder, alleged by police to be 28-year-old Kohberger, who was a criminology Ph.D. student at the neighboring Washington State University, left through a rear sliding door on the second floor, according to the witness.

Bryan Kohberger wears red jumpsuit as he walks into court house

Bryan Christopher Kohberger arrives at the Monroe County Courthouse in Stroudsburg, Pennsylvania. (The Image Direct for Fox News Digital)

Defense investigators in Nevada court filings have claimed that the other surviving roommate, who was on the ground floor, has "exculpatory" information that could clear the suspect.

CLICK HERE TO GET THE FOX NEWS APP

Her lawyer has questioned the legitimacy of that claim and asked a Nevada judge to quash an Idaho subpoena demanding her testimony at Kohberger's scheduled June preliminary hearing. 

Judge Marshall previously said she would not consider the appeal from the Goncalves family attorney, Shanon Gray, until after the Idaho Supreme Court decided on The Associated Press appeal.

Kohberger could face the death penalty if convicted.