When a masked shooter opened fire outside a busy federal courthouse in Dallas on Monday, Dallas Morning News photographer Tom Fox was hiding just steps away. Fox captured a photograph of the gunman, who was clad in tactical gear and holding a high-powered rifle with more than 150 rounds of ammunition.

"I just prayed that he didn't walk past me cause I'm in plain sight, and if he saw me sitting there with a camera, I have no doubt he would have shot me," Fox said.

When a masked shooter opened fire outside a busy federal courthouse in Dallas on Monday, Dallas Morning News photographer Tom Fox was hiding just steps away Tim Brown

It took just seconds for federal agents to confront the gunman. Officers then shot and killed the shooter, who has been identified as 22-year-old Army veteran Brian Isaack Clyde.

Although more than 300 people were inside the courthouse when the gunman opened fire, just one worker suffered minor injuries as she was taking cover. Investigators believe that the gunman never actually entered the courthouse. The federal agents have been credited with stopping the attack in his tracks.

DMN staff photographer @TomFoxPhoto 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. https://t.co/y8fWYYuKjs pic.twitter.com/fE1kFlEy9j — Dallas Morning News (@dallasnews) June 17, 2019



Just feet from the shooting about two hours later, a bomb squad detonated controlled explosions on a vehicle believed to be tied to the gunman as a precaution. The FBI is reviewing his military history and posts on social media, which feature weapons. Clyde served as an infantryman for 18 months before graduating from college in May.



"We have more than 200 FBI agents and partners aggressively pursuing every lead in this investigation in order to identify his family members, associates, and try to get to the bottom of what the motive was," said FBI Special Agent Matthew DeSarno.



The FBI says it will spend about two to three days here processing the crime scene. They also raided Clyde's apartment in neighboring Fort Worth, but have not said what was found.