John McNamara was an old-school reporter.

“Definitely a pen and paper guy,” said David Elfin, who co-wrote a book on University of Maryland basketball with McNamara. “He didn’t wear a fedora, but maybe he should have.”

McNamara worked at the Capital Gazette for more than 20 years, covering everything from local politics to professional sports. Friends, colleagues and young journalists he mentored remember him as a kind person and diligent reporter — someone who earned the trust and respect of his co-workers and sources alike.

The journalist was one of five people killed when a man with a vendetta against the Annapolis newspaper fired a shotgun through the newsroom’s glass doors and at its employees in a targeted shooting Thursday, according to police.

“John had this fierce devotion to his friends and his family,” his wife, Andrea Chamblee, said. “He was fiercely devoted to his craft of telling stories, and I’m so lucky that he was fiercely devoted to me, so I got the best of all of that.”

In an interview, Chamblee said that McNamara’s work delighted both lifelong fans and sports newcomers.

“He taught baseball to foreign exchange students and football to women trying to understand their boyfriends’ obsession,” she said. “He could tell you the story of the sport without making you feel stupid and without condescending.”

The two met in college, at the University of Maryland in College Park, and hit it off talking sports. Chamblee, a devoted fan herself, envied McNamara’s press passes and courtside seats.

At first, Chamblee said, she didn’t think she wanted to start dating. “I was a young, opinionated feminist, and I didn’t think I needed to,” she said. “But I realized he was the perfect guy for me, and I knew I’d be a fool if I let him go.”

Phil Kushin, who worked with McNamara at the Prince George Journal in Emporia, Va., in the 1990s, remembered that the couple “seemed so close and so in love.”

He said his colleague and friend was a master of sports trivia, with an encyclopedic knowledge of facts in a pre-smartphone era.

Working late one night, Kushin thought he had a question that would stump McNamara. Remember Wilt Chamberlain’s 100-point game? Well, who was the leading scorer on the other team?

“Richie Guerin,” McNamara answered, correctly, without missing a beat.

“Doggone if John McNamara didn’t know that,” Kushin said.

When David Deutsch, the former city manager in Bowie, Md., retired in 2016, McNamara wrote about his legacy. Two years later, Deutsch remembered him as a “genuinely good guy.”

The two stayed friends and had talked on the phone just hours before McNamara was shot. They made plans for a dinner date in July, the men and their wives.

Elfin, who knew McNamara for more than 30 years, said the two met as young, part-time reporters covering high school sports for The Washington Post. The two formed a bond during the 1983 blizzard. Snowed in at work, Elfin said The Post put them up for the night at the Vista International Hotel. Seven years later, after D.C. Mayor Marion Barry was arrested there on cocaine charges, McNamara and Elfin joked that they had made the hotel famous first.

Decades later, while covering a University of Maryland basketball game, McNamara met a reporter about as old as he was during that blizzard.

“He took a real vested interest in me,” said Connor Letourneau, then a student journalist at the University of Maryland at College Park. “He was the epitome of the type of veteran sportswriter you want to meet when you’re coming up.”

Letourneau, now a sports reporter at the San Francisco Chronicle, said McNamara was a mentor to him and other young journalists, often taking time to read over stories or talk about the newspaper business.

McNamara, who also wrote a book about University of Maryland football, loved what he did, Elfin said.

“He cares passionately about the D.C. area and, specifically, about the University of Maryland,” he said.

McNamara is survived by his wife, Andrea Chamblee.

Chamblee said McNamara was also a big Washington Nationals fan. He had waited decades for major league baseball’s return to the District. He relished having a hometown team again. He would sit outside on the couple’s porch, radio tuned to the ballgame, and just listen, imagining the action playing out in front of him.