Gerald Fischman and John McNamara, journalists at The Capital Gazette and alumni of the University of Maryland, died Thursday after a shooting at the paper’s newsroom in Annapolis. Fischman was 61, and McNamara was 56.

Fischman and McNamara — both former Diamondback writers — were among five people killed during the shooting, Anne Arundel County Police said. Rob Hiaasen, an assistant editor and columnist for the Capital and a lecturer in this university’s journalism college, was also killed, as were reporter Wendi Winters and sales assistant Rebecca Smith. Several others were injured.

A 1979 graduate of this university, Fischman was the editorial page editor and an editorial writer at the Capital. He is remembered as a talented writer, trivia master and avid cardigan-wearer, according to the Baltimore Sun. He was a staff writer, state editor and assistant managing editor at The Diamondback.

Fischman worked at the Capital for more than 25 years, and wrote “scathing, insightful” commentary on local issues and politics, according to The Sun.

McNamara, who graduated in 1983, worked for more than 20 years at the Capital in various editorial positions. Sports reporting was his longtime dream, the Sun reported. He was a sports staff writer and assistant sports editor at The Diamondback.

In addition to his affinity for writing about sports, McNamara enjoyed taking part in them — he played weekly basketball at the Annapolis Recreation Center, the Sun reported.

In a statement posted Thursday night, this university’s athletic department described McNamara as “ingrained in the fabric of Maryland Athletics” due to his writing.

Police have identified the suspect as Jarrod Ramos, 38, of Laurel, and have confirmed that the shooting was a targeted attack. Ramos filed a defamation lawsuit against the paper in 2012, which he lost.

Anthony Messenger, a Capital intern, broke the news of the shooting when he tweeted at 2:43 p.m.: “Active shooter 888 Bestgate please help us.”

Journalists in the Capital’s office reported from inside the building Thursday afternoon and continued providing updates throughout the day. Many Capital staff members, including reporter Chase Cook, took to Twitter to express continued determination in the face of the tragedy. “I can tell you this,” Cook wrote Thursday afternoon. “We are putting out a damn paper tomorrow.”

This article has been updated.