A suspected armed robber who barricaded himself inside a Rockford bank for hours with a hostage was taken into custody Friday night.

ROCKFORD, Ill. (WLS) -- A Rockford man is accused of sexually assaulting a woman he took hostage during an hours-long standoff with police in Rockford Friday, police said.Nicholas August is charged with armed robbery, aggravated criminal sexual assault and aggravated unlawful restraint after entering a Rockford bank, threatening its employees, taking a hostage and sexually assaulting her, according to Rockford police.Numerous police agencies responded just after 2:30 p.m. Friday to the Heritage Credit Union, located at 5959 E. State. St. in Rockford, for a reported robbery in progress.Police said the robbery suspect, later identified as August, entered the bank and threatened employees before taking a 39-year-old woman hostage and ordering all other employees to leave.Shortly before 9 p.m., a woman who is believed to be the hostage emerged from the bank, followed closely by the suspect. Officers got her away from the suspect, then took him into custody.Police said crisis negotiators were able to convince the man to exit the bank voluntarily.August had a pellet gun that resembled a real firearm, police said. The woman was taken to a local hospital.Police said they learned during follow-up investigation that August had sexually assaulted the woman at some point during the incident.Police said they do not believe the woman and the suspect had any relationship to each other, other than her being an employee at the bank. Police also would not say exactly what demands August made when he walked into the credit union, or why he chose the woman he did to take hostage.Roads in the area of East State Street and Mulford Road reopened shortly after 9:30 p.m.August was transported to the Winnebago County jail. He has a $2 million bond and was wanted on previous domestic battery charges and probation violation.The FBI Chicago office is assisting in the ongoing investigation.No other injuries were reported.