The Smiths lived on the building’s second floor, public records show.

The combination of fire and gunshots made the scene “chaotic to say the least,” Chief Materasso said.

Charles Diggs, who lives in a building next door, said he was about to take a nap on Friday afternoon when he heard a “boom” that turned out to be a gunshot.

“I thought they were doing some construction when I heard a couple of booms,” he said. “It was like boom, then boom, and then a couple of seconds and I heard another boom.”

Around the same time, Mr. Diggs said, he smelled a “peculiar” smell.

“Then I saw the smoke,” he said.

Mary Hall, a nine-year resident of the building’s first floor, was not at home when the deadly events unfolded, but she said she would have been if she had not missed her bus. Like others on the block, she recalled Mr. Smith fondly.

“Unbelievable,” Ms. Hall, 71, said while sitting on the stoop of a nearby brownstone. She said that Mr. Smith and his wife had lived in the building for 29 years and that he was retired. “One of the nicest men I know.”

She described the man found dead in the first-floor apartment as “demented” and said that he had longstanding “issues” with the Smiths, at least partly over how much noise their two cats made.