CNN  — 

It was a normal Monday morning for Dallas newspaper photographer Tom Fox, until it wasn’t.

The Dallas Morning News staff photographer had just arrived at the Earle Cabell Federal Building to cover a trial when he saw the gunman. He was dressed in a black mask and black tactical gear, running toward the courthouse carrying a large rifle and multiple magazines of ammo strapped to his waist.

“I just kept thinking, ‘He’s going to look at me around that corner and he’s going to shoot,’” Fox told the paper.

An armed shooter (shown) attacks at the Earle Cabell federal courthouse Monday morning, June 17, 2019 at the in downtown Dallas. Law enforcement returned fire and the shooter was hit by gunfire. No officers or citizens were injured. (Tom Fox/The Dallas Morning News) -

The gunman soon began firing, shattering glass and sending people in the building diving for cover.

His targets: Fox himself, a security guard, a woman walking a golden retriever and a man who hadn’t tied his tie yet, Fox told his newspaper.

At some point Fox shot, too. And his photo, tweeted by the newspaper Monday morning, is shocking.

The shooter, later identified by officials as 22-year old Brian Isaack Clyde, appears panicked, peering out behind wide-framed glasses over the mask that covers his nose and mouth.

He appears to be loading a magazine into the gun, and in motion.

Fox, who took the photograph while hiding behind a column just steps from the gunman, wasn’t sure if he would be shot.

“I just stood there and prayed that he wouldn’t walk past me,” Fox told the Dallas Morning News. “Because if he walks past me and sees me, he’s going to shoot me. He’s already got the gun out.

“I was just praying, ‘please don’t pass me, please don’t pass me.’”

Bullets ricocheted off the wall above him.

“I saw the puff of smoke, but I didn’t know at the time whether that was him or the police firing,” Fox said.

“I’ll never forget the sound of those repeated firing and all that glass shattering. It seemed like forever before I heard return gunfire.”

Not long after Fox captured the stunning moment, officials engaged gunfire with the shooter, FBI Special Agent in Charge Matt DeSarno said. Clyde was shot and taken to an area hospital, where he died.

“At this time, we have no information indicating that there are other shooters, other threats to the community,” DeSarno said. No officers or other citizens were injured.

The photographer told his paper he was questioned by the FBI.

But he’s got questions of his own, too.

“He was just so young. All I could think was ‘why?’ There’s just too many questions I haven’t processed yet,” Fox told the Morning News. “But this young man, what was it all for? Was it really worth it — for this?”

On his website, Fox says he’s been a photojournalist for nearly 25 years. In 2006 he and his team won the Pulitzer Prize for Breaking News Photography for their coverage of Hurricane Katrina.

“Every day is different, bringing with it new possibilities and an opportunity for creativity,” he writes.