Get the latest on the situation from CNN affiliate KPHO.
(CNN) -- Authorities in Chandler, Arizona, said the gunman who held hostages at a restaurant is the same man who fled into a mall after opening fire on members of a crime task force.
However, the man who surrendered at the Baja Fresh restaurant is not the federal fugitive that U.S. marshals thought they might have spotted earlier outside the Chandler Fashion Center, said Chandler Police Sgt. Joe Favazzo.
After a thorough police sweep, the mall reopened later Wednesday, Chandler Detective David Ramer told CNN.
"We believe there is only one suspect here," Favazzo said.
A woman who fled the restaurant, which is near the mall, told CNN she witnessed the man being taken into custody.
Police identified the suspect as Adam Hernandez.
Baja Fresh customer Leyda Schultz told CNN that a gunman held at least two employees after ordering customers to leave. Schultz said she witnessed the man being taken into custody shortly before 2 p.m.
Favazzo said it was not clear whether the two were patrons or employees. The gunman apparently fired warning shots at the restaurant.
Marshals and other members of a task force had confronted a suspect outside the Sears store on the west side of Chandler Fashion Center, said Arizona Department of Public Safety spokesman Robert Bailey. The suspect opened fire, and officers returned it, Bailey said.
The suspect was being sought in an armed robbery, Chandler police said.
The suspect entered the Sears, and the mall was evacuated and surrounded, Bailey said. A hostage situation was reported about 12:30 p.m. at the nearby Baja Fresh, he said.
Favazzo said officers lost sight of the suspect in the mall.
Marshals earlier Wednesday said the suspect seen at the mall may be fugitive Daniel Munoz Perez, who was mistakenly released last month. Marshals were trailing a vehicle known to be driven in the past by Perez, Jeff Carter with the U.S. Marshals said.
When the suspect -- later determined to be Hernandez -- opened fire outside the mall, it seemed to confirm suspicions that they were following Perez. Carter said the men looked alike and called it a case of "misidentification."
Perez is being sought for aggravated assault for allegedly shooting at a police officer in December, authorities said.
According to U.S. Marshal David Gonzales, Perez was released from the Pinal County Sheriff's Office on December 16. The U.S. Marshals Service has been looking for him since.
Perez is accused of shooting at Arizona Department of Public Safety officers December 11 outside a home in Casa Grande, according to CNN affiliate KPHO.
Perez, 25, was injured by gunfire in the shootout with the public safety officers, according to KPHO. He was admitted to a Phoenix hospital and was later held in another county's jail before being turned over to Pinal County, KPHO said.
But the Pinal County Sheriff's Office said it never received the charging paperwork for Perez, and he bonded out on an misdemeanor warrant. The bond was $320, KPHO said.