DALLAS (CBSDFW.COM) – Dallas Morning News photographer Tom Fox was outside the Earle Cabell Federal Building waiting for a trial to start when he heard three pops.

He thought it was a car backfiring. Instead he was feet from a man intent on trying to shoot and kill people.

Fox noticed the man, later identified as Brian Clyde, 22, standing on the sidewalk.

Tom Fox – Dallas Morning News photographer (CBS 11)

“I just pulled up a long lens and looked through the viewfinder and saw the muzzle of the gun and a guy with the mask on.  I just made some frames real quick and that’s about the time I heard something else that made me run.”

This time, he recognized the gun shots.

Fox captured Clyde’s final moments.

As federal protective service got in a gun fight with Clyde – and killed him – Fox hid in a corner.

“I just crashed in a corner and just tried to make myself as small as possible and just prayed and just prayed that he didn’t walk past me,” said Fox.  “I’m in plain sight, and if he saw me sitting there with a camera, I have no doubt he would have shot me. Instead all I heard was the sound of breaking class and repeated gunfire into the building. And he was literally just around the corner, eight to ten feet.”

The Dallas Morning News tweeted the photo and said, “DMN staff photographer captured this image shortly before a gunman opened fire on the Earle Cabell Federal Building Monday morning in downtown Dallas. Fox was waiting to enter the building to cover a trial when the attack took place.”

Fox says he hasn’t had enough time to process everything yet.

He said he was thankful to be able to go home and enjoy dinner with his family Monday night.

Fox said he has been with the Dallas Morning News for 29 years.