He also identifies another, less obvious, forerunner to his current show.

“Not many people are going to agree with me, but ‘Homicide’ was a comedy too,” he said. “It was a shoot-’em-up, and there were all these dangerous situations, but at heart I think it was an office comedy. We always came back to the squad, and the relationships were built upon mutual affection. And I always felt that they were comic in tone.

“I don’t want to go way out on a limb about this, you know what I’m saying, and be challenged about it. But I think they’re both workplace comedies. In essence it’s taken 20 years to come full circle, but I think they’re in the same place.”

Even if you buy Mr. Braugher’s analysis of “Homicide,” it was still the case that he had not acted in a situation comedy, or worked at any length in an improvisational style, in his professional career. But by all accounts he has been a quick study.

“He has an incredible performance I.Q., like the way they talk about a football I.Q., it just comes very naturally to him and he understands what things are and are not supposed to be,” Mr. Samberg said. “At first if we’d come into a scene and somebody would throw a line out that wasn’t in the script, it would definitely throw him for a loop, because I think he’s much more used to hard-scripted performing.

“But he’s gotten so much better at everything he was worried about, so fast, that it’s getting to the point where I feel like it won’t even really be a conversation anymore, that he’s just a great comedic actor and he knows how to do it. He’ll throw an improv out as quickly as some of our other cast at this point. It’s been fun to watch, for sure.”