An armed man allegedly held two people hostage over the course of several hours in an Oklahoma office building on Monday but caused no injuries, Yahoo! News reported.

"Suspect in custody," said police in Norman, about 20 miles from Oklahoma City, in a statement. Police said they had been in talks with the suspect, trying to negotiate a peaceful resolution to the standoff.

Dozens of people were shown escaping from the Nextep office building as police and emergency responders surrounded the area.

David Blair, a paralegal at a law office inside the building, said one woman told him she was being held hostage.

"She seems OK. She was a little shaken up," he said, adding the gunman allowed the woman to use her cell phone.

Jennifer Shokat, 32, was the woman held hostage by the gunman, later identified as Devin Rogers, ABC News reported.

She hid under her desk as she heard Rogers shoot his way into the office building. He told Shokat, a mother of two, that he wasn't going to hurt her.

While she was being held, Shokat was able to reach out to family and friends through text message, reassuring them that she was OK.

Shokat said Rogers, 29, was friendly and asked her before he lit up a cigarette. He told her he was a veteran who was deployed to Afghanistan and Iraq, leading Shokat to feel badly for him.

"He had no more value to society. He had come back and could not find any work that would pay above minimum wage, and he said that he just wanted to go to jail, but he wanted to negotiate terms," she said.

Shokat was allowed to leave after Rogers and police were connected through a cell phone call and worked out a surrender. 

Rogers is being held in Cleveland County Detention Center, facing charges including kidnapping, weapons, battery and assault charges.