QARGHA LAKE, Afghanistan — As families ate a late dinner at a popular lakeside resort hotel here on a warm summer night, at least three Taliban shot their way into the compound, entered the dining room and took an unknown number of hostages, Afghan officials said early Friday.

At dawn there was still gunfire, and Afghan police officers were fighting with the attackers but trying to stage a counterattack so as not to harm the families held hostage, said Gen. Mohammed Zahir, head of the Kabul Criminal Investigation Division.

“The Spozhmai Hotel is not a military facility, it’s a civilian hotel,” General Zahir said. “We still do not know why the Taliban targeted the Spozhmai Hotel.”

Haji Abdul Qadir, the district governor of Paghman, the district of Kabul Province where the resort is, said that the police told him that at least one guard had been killed and another had been wounded, but that there were likely to be other casualties.