DALLAS — A five-hour manhunt for the gunman who shot two Dallas police officers and a Home Depot loss-prevention officer Tuesday ended with an arrest following a high-speed chase through the city.

Authorities arrested Armando Luis Juarez, 29, who faces multiple charges of aggravated assault on a police officer in the shootings at the Lake Highlands store.

He was taken into custody after the chase, which started in southeast Dallas after someone spotted the truck he’d been seen fleeing the Home Depot in. The pursuit ended near Love Field about 9:15 p.m., and a woman with Juarez was also taken into custody. Her name has not been released.

“I want to thank our Dallas police tonight,” Dallas Mayor Mike Rawling said late Tuesday. “They’ve taken a punch and they’ve come out fighting.”

Juarez originally had been described as a person of interest in the shootings, which occurred about 4:15 p.m.

An off-duty police officer working at the Home Depot near U.S. Highway 75 and Forest Lane had called for assistance after detaining a man, Dallas police Chief U. Renee Hall said.

When police arrived, the detained man “produced a handgun” and shot the responding officers and a store loss-prevention officer, police said. The off-duty officer was not wounded.

The three victims were taken to Texas Health Presbyterian of Dallas, where they underwent surgery Tuesday night. Officials declined to release their names or detail their injuries.

Hall did not explain how the suspect obtained a gun but believed he was still armed as authorities began searching for him in a wooded area and creek near the store.

As police fanned out across the area, light-rail passengers were prevented from boarding or exiting at the Forest Lane Station, DART spokesman Mark Ball said. But service resumed about 7 p.m. as police turned their attention to other locations.

Although officials refused to discuss the officers’ conditions, their tone was mournful as they urged the public to pray for the victims and their families.

“Once again Dallas is at the precipice, looking into the hell of heartbreak as our police department was attacked this afternoon,” Dallas Mayor Mike Rawlings said at the news conference.

He said he understood and appreciated why the police chief was “being conservative” releasing information. For now, the focus should be on the welfare of the victims’ families.

“The difficulty at the moment is trying to process the emotions of dealing with the officers who were injured while also trying to locate the shooter,” Rawlings said. “We’re praying for them, but there is still the work to be done.”

Council member Adam McGough, who represents the area, said he is praying for the officers and their families.

“It’s just more reminder of what a dangerous job they have,” he said.

Juarez’s father, Ruben Juarez, said Tuesday night that he didn’t believe his son was responsible for gunning down three people.

“There’s no way my son could’ve done this,” he said, adding that he doesn’t believe his son owned a gun.

However, he said police had gone to Juarez’s mother’s house to look for his son and showed her surveillance video of him shooting officers in the face.

Juarez’s grandmother, Janie Longoria, spoke to reporters outside her Dallas home Tuesday night and said she couldn’t believe what she was hearing about her grandson.

“He’s a very sweet, sweet, lovable person,” she said. “He doesn’t carry a gun. He doesn’t have a gun.”

She said that when police came looking for her grandson, they told her he’d been caught stealing at a Home Depot and someone had been hurt.

Longoria said tearfully that she doesn’t believe Juarez, who comes from a family of law enforcement officers and has two young daughters, would shoot at police.

“We back up the police officers, and I couldn’t believe that one of the members of my family would do that,” she said. “I just can’t believe it.”

Longoria said she knew her grandson, who used to live with her, had an outstanding warrant for a ticket and thought that might be why authorities were searching for him.

Juarez, who has worked as a mechanic and bricklayer for a family business, had been living with friends, she said.

Court records show Juarez was arrested in January on a charge of unlawful use of a motor vehicle after officers found him in a stolen truck, records show.

He was also arrested in December on a theft charge. He has also pleaded guilty to attempted possession of a controlled substance.

She said she didn’t like some of the company he kept, “those low-life people.”

“And I told him to stay away from those people,” she said.

“If he’s on the run, I’d tell him: Luis, go to the police or call the police and give yourself up because I know for a fact that you didn’t shoot these people,” she said.

In February, a Richardson police officer was shot and killed after responding to a disturbance call. Officer David Sherrard was the first officer killed in the line of duty in the department’s history, and the first on-duty officer to be killed in Texas this year.

Last year, a barricaded gunman in Little Elm unleashed a “hail of gunfire” on Detective Jerry Walker and fellow SWAT officers. Walker was the first Little Elm officer to die in the line of duty.

In spring 2016, Euless Officer David Hofer was fatally ambushed while responding to a report of a gunman at a park.

That same month, Fort Worth Officer Matt Pearce was shot seven times while pursuing two robbery suspects. He survived his injuries and eventually returned to duty.

In July 2016, a gunman opened fire on officers protecting protesters in downtown Dallas. Four Dallas officers and a Dallas Area Rapid Transit officer were killed, and nine others were injured.

Dallas officer Josh Burns was shot in 2014 while he and a partner were responding to a domestic disturbance in far northeast Dallas.

Before the ambush, the last Dallas officer to be fatally shot in the line of duty was Norm Smith in 2009.