A judge has ordered that alleged cinema gunman James Holmes stand trial over a massacre that killed 12 people in Colorado last July, court documents showed.
Judge William Sylvester on Thursday found that prosecutors had established there was "probable cause" to believe the defendant committed the crimes, and ordered Holmes to be arraigned in court on Friday.
"The court orders that Defendant shall be bound over for trial on all counts," he wrote in a 61-page ruling posted online, listing all 166 charges against the 25-year-old.
Holmes is accused of killing 12 people and injuring at least 58 during the July 20 shooting at a midnight screening of the latest Batman movie in a theater in Aurora, Colorado.
Witnesses said Holmes threw smoke bomb-type devices before opening fire randomly with weapons including an AR-15 military-style rifle, a 12-gauge shotgun and a .40-caliber pistol.
Over three days earlier this week, prosecutors called witnesses who gave harrowing accounts of the slaughter, and played 911 emergency calls in which the chaos and loud gunshot booms could be clearly heard.
Holmes' lawyers had been expected to present witnesses to bolster a case that he may be mentally unfit to stand trial. But in the end they announced they would not, and the judge adjourned the hearing Wednesday until Friday.
Shortly before the judge's trial order, Holmes' lawyers filed a motion for Friday's court appearance to remain merely a status hearing, rather than an arraignment, in which he is formally charged.
But Sylvester said the hearing, scheduled for 9:00 am (1600 GMT) Friday, "is hereby converted to an arraignment."
He also dismissed suggestions that Holmes was mentally unfit to stand trial, which had been expected to be argued by defense lawyers.
"The court finds... that there is probably cause to believe that Defendant had the requisite mental state... necessary to commit the crime of first degree murder after deliberation," he wrote.
During this week's preliminary hearings, the prosecution presented evidence that Holmes had planned the attack well in advance.
It included photos found on his iPhone suggesting he had surveyed the cinema weeks before the shootings. There were several images showing him posing with guns and explosive devices hours before the massacre.
He had also made at least 16 purchases from May to July 2012, including four firearms, incendiary devices and almost 6,300 rounds of ammunition, the court heard.
The charges against Holmes include murder in the first degree for the 12 people who died, attempted murder for the injured, as well as possession of explosives or incendiary devices.
Before this week's hearings, there had been speculation that Holmes' lawyers could seek a plea agreement under which he would admit guilt in return for avoiding the death penalty, for example.
The Aurora massacre revived the perennial US debate over gun control -- an issue re-ignited even more intensely by last month's shooting of 20 young children at a Connecticut elementary school.