SANDPOINT, Idaho —  A Bonner County Magistrate Court judge has ruled that the first-degree murder case against Judith Carpenter for the 2017 killing of Shirley Ramey in Hope, Idaho can go forward in district court.

During a preliminary hearing in Sandpoint on Wednesday, a judge bound the case against Carpenter over to Bonner County District Court, where the trial will be held.

Carpenter faces a charge of first-degree murder for the 2017 killing of 78-year-old Shirley Ramey in the small town of Hope. Carpenter allegedly shot Ramey, a longtime Hope city clerk, in the head at her home on Trestle Creek Road. Investigators said that the murder appeared to be random, but court documents indicate that Carpenter intended to rob Ramey's home.

Carpenter was arrested later the same day after pulling a gun on a couple in Montana during a road rage incident. Less than two years later, a request from a federal investigator to test the pistol Carpenter used in Montana linked her to Ramey's killing, which had turned into a cold case.

KREM's Taylor Viydo was at the preliminary hearing on Oct. 2, where testimony was presented by both sides as a judge decided whether the case should go to trial.

According to testimony, Carpenter called 911 in Kootenai County earlier the day of the murder to report someone breaking into her home, and cell phone records placed her in Sagle approximately 30 minutes to an hour before the murder.

A deputy who arrested Carpenter in Montana testified that she was "delusional." She allegedly had claimed someone stole her identity while trying to enter Canada.

Prosecutors said in the hearing that Carpenter previously spent time at the Idaho State Hospital in Orofino.

During cross-examination, a Bonner County Sheriff's detective testified that investigators hadn't found a singular motive for the murder and investigators didn't find an apparent connection between Ramey and Carpenter.

Ramey's husband also testified during the hearing about finding his wife dead in their home.

"This woman came to my home, and killed my wife," he said. "Finding my wife laying dead in a pool of blood, was the worst day of my life."

Prosecutors said that Carpenter wanted to shoot someone.

"[Carpenter] wanted to shoot things and she wanted to shoot people," a prosecutor said during closing arguments.

RELATED: Ramey murder suspect pulled gun on couple in Montana after killing, docs say

RELATED: 'There's some closure': Hope murder victim's husband speaks out

RELATED: Suspect in 2017 Hope, Idaho murder arrested for road rage same day as shooting

The following video is a report about Carpenter's arrest in relation to the cold case.