UNDATED (CNN) -- A federal judge ruled Wednesday that Jared Lee Loughner is unfit to stand trial. Loughner is accused of a mass shooting in Tucson where he allegedly tried to assassinate U.S. Representative Gabrielle Giffords. Six people were killed and 13 wounded in the January attack.
Jared Loughner was pulled from his chair and dragged out of the courtroom by u.s. marshals during a mental competency hearing Wednesday in Tucson.
It happened following an outburst from Loughner that sounded like, "thank you for the freak show."
Federal judge Larry Burns then ruled he was incompetent to stand trial for the Jan. 8th Tucson shooting rampage.
The judge agreed with two mental health evaluations of Loughner that concluded he doesn't understand what's going on in court, and can't help in his own defense.
From here, Loughner will spend the next few months in a mental health facility, where prosecutors say they're confident he can be helped enough to stand trial. U.S. Attorney Dennis Burke says, "Our goal has always been and will always be to go to trial in this case. We're prepared to go to trial."
Loughner pleaded not guilty to 49 charges.
The shooting rampage outside a Safeway supermarket wounded congresswoman Gabrielle Giffords, causing brain damage, and killed six people, including a federal judge and 9-year-old Christina Taylor Green.
Several of the victims were in court, some clearly upset with the rulings.
Others said they agreed with the judge. Shooting victim Eric Fuller says, "You don't have to be a professional psychiatrist, to know the boy is disturbed."
Criminal defense attorney Greg Kuykendall says there's a good chance Loughner will eventually be able to stand trial, but a jury may end up sending him to a mental hospital instead of prison. He adds, "The clearly has a diminished mental capacity right now and I think there's a strong argument that he had a deeply diminished mental capacity at the time of the crime"
CNN reached out for reaction from Gabrielle Giffords office they told us they never comment on Jared Lee Loughner. Meanwhile Loughner is expected to spend the next few months in a mental health facility in Springfield, Missouri.
He's scheduled to be back here in Tucson in September.