Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Authorities have arrested a suspect in the "execution-style" shooting of a uniformed Texas sheriff's deputy.

Shannon J. Miles, 30, of Houston, has been charged with capital murder in the fatal shooting of Harris County Sheriff's Deputy Darren H. Goforth, officials said Saturday afternoon.

Goforth, 47, was killed Friday night after exiting a Houston gas station convenience store. He was ambushed by a gunman who shot him from behind at around 8:20 p.m. local time (9:20 p.m. ET).

"We haven't been able to extract any details regarding a motive at this point," Harris County Sheriff Ron Hickman told reporters Saturday. He called Goforth's death a "senseless and cowardly act."

Miles was charged Saturday afternoon after being questioned as a person of interest by authorities. Police say they are not looking for additional suspects.

RELATED: Texas Sheriff's Deputy Darren H. Goforth Killed; Person of Interest Being Questioned

Shannon Miles, 30, is shown in this booking photo provided by the Harris County Sheriff's Office on Aug. 29. HANDOUT / Reuters

"As far as we know, Deputy Goforth had no previous contact with the suspect, and it appears at the outset to be clearly unprovoked," Hickman added.

Earlier Saturday, officials said a person of interest was taken in for questioning and was cooperating. Hickman said "Miles is the man that we have had all night."

Records do not list an attorney for Miles. He is a former student at the University of Houston and last took classes there while living on campus in either 2011 or 2012, a spokesperson for the university said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In an emotional news conference hours before Miles' arrest was announced, a visibly angry Hickman told reporters that "dangerous rhetoric" against law enforcement had "gotten out of control."

"We've heard black lives matter — all lives matter," he said. "Well, cops' lives matter, too."

A weapon from Goforth's shooting was recovered, and ballistics tests "indicate it is a match" with a weapon belonging to Miles, Hickman said. Miles has a previous criminal record that includes trespassing and disorderly conduct with a firearm, he said.

Goforth had just filled up his patrol car at a Chevron gas station around when a man "walked up behind him and literally shot him to death," Hickman said at a news conference overnight.

After Goforth crumpled to the ground, the suspect towered over him and fired several more shots.

"It appears to be an unprovoked execution-style killing of a police officer," Hickman said.

Deputy Darren Goforth, pictured in this official image from Harris County Sheriff's Office. Handout / Harris County Sheriff's Office

Earlier, police had described the suspect as a male with a dark complexion who was in his 20s, wearing a white T-shirt and red shorts. He was reportedly driving a red or maroon Ford Ranger with an extended cab.

Hickman said investigators located the vehicle and that led them to Miles' home.

The investigation is still in its early stages, but Hickman said the assumption is that the suspect targeted the married father of two simply because he was in uniform.

"The motive for this is absolute madness," Hickman said.

Harris County District Attorney Devon Anderson said Saturday that law enforcement needs support despite there being a "few bad apples" — an apparent reference to the recent spate of police shootings of unarmed people.

"There are a few bad apples in every profession. That does not mean there should be open warfare declared on law enforcement," she said. "The vast majority are here to do the right thing. They care about their community. What happened last night is an assault on the fabric of society."

Shannon J. Miles, 30, is walked out of the Harris County Sheriff's Department in Houston on Aug. 29. Marie D. De Jesus / AP

Hickman added that it was "time to drop the qualifier" in the rally cry, "Black lives matter," which has proliferated online following the police shootings of Michael Brown and other young black men.

Houston Mayor Annise Parker ordered city flags lowered after Goforth's killing. U.S. senator and presidential candidate Ted Cruz expressed his condolences on Twitter: "Horrific news from my hometown. My prayers are with the family and community."

On Saturday morning, balloons, flowers and candles were placed at the Chevron station gas pump that Goforth used before he was killed. A note at the memorial read, "Gone but never forgotten R.I.P Deputy Goforth," The Associated Press reported.

Brian McCullar knew Goforth because the deputy had patrolled his neighborhood, which is about two miles from the gas station, and the two spoke often.

"He was passionate about what he did," the 49-year-old told the AP. "We're still in shock. ... It's a huge loss for his family. It's a huge loss for this area."

"You're talking about a guy that made a difference," McCullar said.