Warning: This article includes a picture of an armed gunman. This may be distressing for some people.
A gunman clad in a mask, tactical gear and carrying a high-powered rifle opened fire outside a federal building in Dallas on Monday, causing alarm and panic but no injuries before he was fatally shot by the police.
The shooting was reported widely.
But perhaps the best documentation of the incident came from Tom Fox, a photographer for the Dallas Morning News.
Fox was there at the beginning of what would have been a typical day for any metro journalist: he was headed to the inauguration for the city's new mayor but first stopped by the building, which houses a federal courthouse, to snap photos of a defendant in a case about charter school fraud.
So he was waiting right in front of the building when the gunman, whom authorities identified as former Army infantryman Brian Isaack Clyde, showed up and opened fire.
Instead of running, Fox's first instinct was to take photos.
The results offered a rare glimpse of an active shooting from the perspective of someone in the immediate path of danger.
Fox snapped one of the gunman, taken from just a few metres away, as the man approached the building in a low walk, his gloved hands holding a gun and ammunition clips racked on his belt.
Authorities later said that the man had five 30-round magazines.
Fox also snapped photos of people, a security guard and a man in a suit fleeing as the gunman released a volley of shots.
Fox then jumped behind a column near the building's entrance, attempting to make himself "as small as possible", according to an account he gave to the Dallas Morning News.
"I just stood there and prayed that he wouldn't walk past me," Fox said. "Because if he walks past me and sees me, he's going to shoot me. He's already got the gun out."
Fox, who did not respond to an interview request from the Washington Post, shot video as well, including one recorded in the harrowing moments after the gunman retreated across the street.
The video captures Fox talking to unidentified authorities, potentially law enforcement, who ask where the gunman went.
Fox can be heard panting. "He didn't go past me," he tells them.
"He was here and came this way."
Video taken by another bystander from high above the street shows just how close Fox was to the shooter. The gunman runs up to the front of the federal building, at one point appearing to shoot toward the front entrance.
The entrance to the building is framed by two bulky columns that jut out from its exterior.
Fox hides behind one, unseen by the gunman, but just a few steps away.
The gunman then retreats, apparently after taking fire himself. He runs to a parking lot across the street; more shots ring out in his direction. Fox continued to take photos.
WFAA viewer Tim Brown recorded this video from a shooting outside the Earle Cabell Federal Building #WFAApic.twitter.com/uQ3iNupjig
Fox took more photos and video of the gunman, then shirtless and injured, and the emergency responders that surrounded him.
He told the Morning News, where he has worked for 29 years, that the most perilous situation he'd ever faced on the job was a pack of hungry pit bulls he fended off in Louisiana after Hurricane Katrina. He said he'd never been shot at. That his first move was to grab his camera was simple reflex.
"Your journalistic instincts just kick in," he said. "You use the camera almost as a shield. I also felt a journalistic duty to do all that."