Clutching a handgun, Mr. Hamade had turned back to the dining room to help his guests. The manager had always promised that if his restaurant was ever attacked, he would defend it himself.

“He said he was going back down to the dining room to help his guests,” said Farid, a cook at the restaurant who also goes by a single name. “If he was alive, we would still work with him there.”

Mr. Hamade ran the casual Lebanese cafe for years, charming the many Westerners who frequented his establishment and plying them with free chocolate cake. He kept a feisty dog on the premises, Jeff, given to him by one of his security guards three years ago. Mr. Hamade and his dog died in their restaurant.

Inside the restaurant, divided into two separate dining areas, the gunmen worked their way through the room. Haji Amin, a businessman who had just sat down to dinner with his new wife, called his uncle with a cry for help before the assailants killed the young couple. Four employees of the United Nations in Afghanistan, including the organization’s chief political affairs officer, also died in the fusillade. So did the International Monetary Fund’s representative in Afghanistan.

Upstairs, 11 of the restaurant staff scrambled through a hatch leading to the roof. The sound of gunfire, and the gunmen’s shouts of “God is great,” filled the air. After climbing one by one through the small slot, the men jumped into a neighbor’s compound. A few were injured as they landed on the frozen earth. Moments later, the police discovered the rattled workers and escorted them to safety. It would be hours before elite police units would take control of the restaurant.

When the security forces began carrying out the bodies, a police officer asked the survivors to help identify the suicide attackers. They wore gray clothes, recalled Atiqullah Aslami, a cook, and had shaved faces. Afterward, the police loaded the corpses into an ambulance and drove off. The workers, whose belongings were still inside the restaurant, caught rides home.

In the days after the attack, the workers have intermittently returned to the restaurant, to pay their respects, help clean up and claim their possessions. Fawad Sharifi, 35, a baker, showed up Saturday to retrieve his car, which was in tatters after being damaged in the explosion. Somehow, it managed to start.