When the first shot went off, shattering the glass doors to the newspaper office, people at their desks struggled to grasp what was happening. Anthony Messenger, a sports intern, thought the popping sound might be fireworks. He couldn’t see anyone.

Then came more blasts, one after the next. He and another reporter, Selene San Felice, raced to the newsroom’s back door that was always unlocked. This time, it was jammed shut.

The pair crept beneath a desk as far away from the front door as they could and waited. They huddled together — silent but urgently texting a parent, sending a tweet (“Active shooter 888 Bestgate please help us”) and calling 911, but never speaking into the line for fear of being heard.

“It was insane,” Mr. Messenger, who had worked at the Capital Gazette for four weeks, recalled Friday morning in an interview on the Today Show. “In that moment, I thought I was going to die.”