This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Please enable Javascript to watch this video

HARRIS COUNTY, Texas — The back-and-forth continues for a man accused of callously gunning down a Harris County deputy constable in 2015. On Wednesday, a judge ruled that Shannon Miles is competent to stand trial in the death of Deputy Darren Goforth.

Miles was charged with murder in the Aug. 28, 2015 execution-style ambush killing of Goforth. Since the murder, Miles has been undergoing a series of mental evaluations to determine his state of mind when he allegedly killed the law enforcement officer in cold blood. First he was found to be incompetent, then a judge reversed that finding.

Attorney Anthony Osso requested Miles be properly evaluated in November, and a judge ordered his client to undergo another mental evaluation, causing a delay in the trial.

"The most serious responsibility of a district attorney is to seek the death penalty. As a result, a team of senior prosecutors form a committee that reviews capital cases, and will review this case, to determine how we will proceed," said District Attorney, Kim Ogg.

Prosecutors said Miles killed Goforth simply because of the uniform he was wearing. The two men had never met before.

At a press conference following Miles’ 2015 arrest, former Harris County District Attorney Devon Anderson described what happened during the attack.

Miles was allegedly sitting in his red Ford Ranger pickup truck at a gas station on West Road when he spotted Goforth.

Goforth pumped gas into his patrol car, then went into the store. When he walked back outside, a man ran up behind him and opened fire. Goforth never had a chance to react.

The shooter unloaded 15 rounds from a .40 caliber handgun into the back and head of the deputy, then jumped into a truck and drove off.

Law enforcement sprang into action, pulling up vehicle registrations in the same zip code for the model of the truck — with a distinct trailer hitched to the back — that witnesses described to authorities. That search led them to the home of Miles, and an empty gun was also found in his possession. Authorities said ballistics testing matched the gun to the shell casings found at the murder scene.

Investigators began to dig up Miles’ past, trying to determine a motive for the killing. Though they could find no direct link to Goforth, Miles had several run-ins with the law.

Records show Miles attended Prairie View A&M University and the University of Houston, and had a lengthy arrest record with charges including resisting arrest, criminal mischief, trespassing, evading detention, and disorderly conduct with a firearm. Two of his arrests involved him using force against the arresting officers. According to his mother and his defense attorney, Osso, Miles had a lifelong history of mental illness.

In 2012, Miles was charged with aggravated assault with a deadly weapon after he attacked a man at an Austin homeless shelter during a fight over a television remote. He was transported to a mental hospital, but the charge was later dropped after authorities could not find the victim.

After the Goforth attack, Miles was, again, transported to a state mental hospital after being found incompetent to stand trial.

The investigation swiftly took a bizarre turn, and some argued that it shifted attention away from the actual shooting and dove deep into the personal lives of many who were actively involved in the investigation.

Starting with Goforth.

According to investigators, Goforth was a married man and was at the northwest Harris County gas station that night to meet his mistress, who witnessed him being gunned down. But the mistress’ close connections with law enforcement officers also put a dark cloud over the case.

During the investigation, it was revealed that the mistress had a sexual relationship with one or more of the deputies who were investigating Goforth’s murder. Deputy Craig Clopton, who admitted to having consensual sex with the mistress while the investigation was ongoing, was later terminated for employee misconduct. Months later, Deputy Marc De Leon was fired for being untruthful to investigators. Some speculated he, too, was “involved” with the woman.

Houston activist Quanell X spoke out about the deputies’ actions, and asked the Texas Rangers to investigate any relationship Goforth and others in the sheriff’s department may have had with the woman.

“They knew she had a secret relationship and history with Goforth and looks like many others in that department,” said Quanell X. “What woman would allow herself to be passed around like donuts on a Sunday in coffee shop between deputies?”

Judge Denise Collins, who was initially presiding over the case, later recused herself from the Goforth case for undisclosed reasons, and in another shocking twist, another deputy — with a distant connection — was gunned down in an unprovoked attack. That victim, who survived, turned out to be the brother of one of the terminated deputies. The two cases have not been connected, and the shooter of the second deputy remains on the loose.

Goforth was a 10-year veteran of the Harris County Sheriff’s Office. He was 47 years old, a husband and a father of two. Loved ones said they would always remember his smile and his “stupid” sense of humor.