The suspect in a shooting at a small Seattle university wanted to kill as many people as possible before killing himself, police said.
A judge on Friday found probable cause to hold 26-year-old Aaron Ybarra without bail.
The hearing came a day after Ybarra was arrested in the shooting that killed student Paul Lee and wounded two other young people, one critically, at Seattle Pacific University.
In a statement filed in court, Seattle police wrote that Ybarra admitted to detectives after his arrest that he wanted to kill as many people as possible and then himself.
Instead, police say a student building monitor pepper-sprayed and tackled Ybarra as he reloaded his shotgun.
Police said the shooter had 50 additional shotgun shells and a hunting knife.
There have been a series of shooting sprees in the US in recent years, amid a fierce debate over the country’s gun laws and its system for dealing with mental health issues.
Several of the attacks shave been on or near US university campuses.
About two weeks ago, according to police, Elliot Rodger killed six people and injured seven before turning his gun on himself in a rampage in Isla Vista, California, near two universities.
Ybarra has a long history of mental health problems for which he had been treated and medicated, said his attorney, public defender Ramona Brandes.
“He is cognizant of the suffering of the victims and their families and the entire Seattle Pacific community,” she said. “He is sorry.”
Ybarra is not a student at the school, police said.
“We are so very shocked and sad over yesterday’s shootings at SPU,” Ybarra’s family said in a statement. “We are crushed at the amount of pain caused to so many people.”
Seattle Mayor Ed Murray identified the student killed as 19-year-old Paul Lee, a “Korean-American student with a bright future.”
Ybarra was hospitalized for mental health evaluations twice in recent years, said Pete Caw, assistant police chief in Ybarra’s hometown, the suburb of Mountlake Terrace.
Officers encountered Ybarra in 2010 and 2012.
Both times, he was severely intoxicated and taken to a hospital for evaluation, Caw said.
In the 2012 incident, police found Ybarra lying in a roadway.
He told officers he wanted a SWAT team “to get him and make him famous,” a police report said.