The journalists from the Capital Gazette never stopped doing their jobs.

The suspected gunman, who held a grudge against the company, roamed the newsroom of the community newspaper chain in Maryland’s capital with a shotgun on Thursday, the authorities said, firing at their colleagues, and leaving five staff members dead.

But perhaps the first news of the shooting came in a message from the Twitter account of Anthony Messenger, a summer intern: “Active shooter 888 Bestgate please help us.” The crime and courts reporter, Phil Davis, crouched under a desk and then reported what he saw and heard when he was safe. A photojournalist, Joshua McKerrow, got to work snapping photographs of the response by law enforcement outside their newsroom in Annapolis, Md.

“I can tell you this: We are putting out a damn paper,” Chase Cook, a reporter at the newspaper, said on Twitter on Thursday afternoon.

[Tell us how your local paper has helped shape your community.]

At the Westfield Annapolis mall across the street from the newsroom later Thursday night, reporters huddled in the garage around a laptop in the back of a silver pickup truck. They filed articles and photographs, while they texted and talked with loved ones and friends checking on them.