(CNN) - As a gunman opened fire inside Building 2 of the Virginia Beach Municipal Center on Friday, everyone was scrambling for safety.
But not Ryan Keith Cox.
"If it wasn't for him, there would have been several more people that had perished," city employee Christi Dewar told CNN affiliate WAVY.
Dewar didn't budge when she first heard the gunshots. The building was under construction, and she thought that was behind the popping sounds.
But she began to run alongside her colleagues when she heard people yelling "active shooter," she told WAVY.
That's when she saw Cox, who told her to get inside a colleague's office "now."
"Barricade the office," she said he told her.
"'I said 'Come on Keith' and he said 'I gotta check on everybody else,'" Dewar told the affiliate.
"We closed and locked the door and we pushed the cabinet up against the door," she said.
Not long after she heard the shooter attempt to enter the office and then fire four shots.
"I looked out and two of the shots had almost come through the cabinet, the back of the cabinet."
Cox never returned. He was one of 12 people killed in the shooting.
Cox, an account clerk, had worked in the public utilities department for 12½ years.
"He was a hero," Dewar said. "A guardian angel that walked this earth that didn't deserve to leave us so soon."
Cox's brother posted photos of him on Facebook Saturday and shared a note.
"My heart is hurting because my baby brother was murdered today by the shooter in Virginia Beach mass shooting," he wrote.
"I won't (hear) his beautiful singing voice at church or home anymore. I loved my brother and will truly miss his caring soul. Until we meet again in heaven."
CNN's Jason Hanna and Ray Sanchez contributed to this report.
The-CNN-Wire ™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.