Shannon J. Miles
, 30, faced one count of capital murder of a police officer or firefighter for the killing of Deputy Darren H. Goforth
Goforth died August 28 when a gunman came up behind him at a gas station and shot him in the back.
When he fell, the shooter stood over him and fired more shots, authorities said. Goforth, a 10-year veteran of the sheriff's office, was shot 15 times, authorities said.
Goforth was in his Harris County Sheriff's Office uniform at the time of the shooting, which officials described as an "execution-style" attack.
Defense medical experts and a Harris County doctor made recommendations to Judge Susan Brown that Miles was not competent at this time.
He will go to a state mental hospital for at least 120 days.
Prosecutor Marcy McCorvey said Tuesday's ruling doesn't rule out a trial in the future.
"There's no reason to believe he won't be restored to competency and will stand trial," she said.
The sheriff's office expressed disappointment.
"But (we) remain hopeful that the state will restore Shannon Miles' competency promptly so justice can be sought," the office said in a statement. "It is a tragic reminder that we lost Deputy Goforth to an individual whose only apparent motive was that Darren wore the uniform of a law enforcement officer."
According to CNN affiliate KTRK
, defense attorneys said their doctors say Miles is schizophrenic and psychotic.
CNN affiliate KSAT
reported there is no room at the mental hospital, so Miles will remain at the Harris County Jail. He is being held without bail.
This is the second time Miles has been ruled incompetent. In 2012, Miles also was found mentally incompetent to stand trial on a separate felony assault charge, a prosecutor said in September.
At the time, he was charged with aggravated assault with a deadly weapon after fighting a man at an Austin homeless shelter over the TV remote control, said Joe Frederick, a prosecutor in Travis County.
Deputy a mix of 'toughness and gentility'
In September, Kathleen Goforth described her fallen husband to KTRK
in Houston as "an incredibly intricate blend of toughness and gentility."
Goforth was guided by an inner moral compass, she said, adding that she was lucky to have been married to him.
"He was who you wanted for a friend, a colleague and a neighbor," she said.
In addition to his wife, Goforth left behind two children, ages 5 and 12.