(CNN) -- A hostage situation at a Texas bank ended Friday afternoon with all hostages safe and suspects in custody, said Lt. Onesimo Lopez of the Pearland Police Department.
Lopez said that two armed men had taken an undisclosed number of employees and customers hostage during the bank robbery Friday morning in suburban Houston.
The first suspect was taken into custody in the early stages of the robbery when there was an exchange of gunfire, detectives told CNN affiliate KPRC. The second suspect was taken into custody at the end of the standoff, police said.
Some hostages were released earlier in standoff, and two were released at the end of the event, Lopez said.
About four hours after the situation began, police used a "flash-bang" diversionary device in the Chase Bank branch, Lopez told reporters.
Once the faceoff ended, police escorted from the building three persons who had been hiding in a closet throughout the foiled bank robbery, Lopez said.
A bank manager was physically assaulted by a robber, but the manager's injuries weren't serious, according to authorities and a statement by Chase spokeswoman Mary Jane Rogers.
"We are working with employees and customers who were at the scene to provide any assistance they or their families need. Our branch manager, who was injured during the robbery attempt, was treated at the hospital and has been released," Rogers said.
"We are very relieved that the situation at our Pearland, Texas, branch was resolved and thank the FBI and police for their tremendous courage and help," she said.
After more than two hours into the standoff, the gunmen began releasing some of the hostages, police told CNN affiliate KPRC Friday afternoon.
At 11 a.m. (12 p.m. ET) Friday, a passer-by made a 911 call saying he saw masked men entering a Chase bank, Lopez said in a separate interview with CNN.
"They were wearing masks and they were moving quickly, which is what prompted the 911 call," Lopez said. An officer happened to be in the area and responded within minutes, he said.
"From what I was told there was a possible exchange of gunfire," Lopez added. "We don't know who exactly was firing, and our officer was not injured, and we're not sure if the suspects were injured."
Pearland is about 16 miles southeast of Houston.
CNN's Jason Hanna, Maria White and Michael Ryan contributed to this report.