KABUL, Afghanistan — The Taliban’s bloody, 14-hour siege on a major hotel in Kabul ended on Sunday, after six assailants terrorized much of the city with explosions and gunfire.

The exact number of casualties remained unclear, and the authorities said it might take days to determine the extent of the material damage. Najib Danish, a spokesman for the Interior Ministry, said that 14 foreigners and four Afghans had been killed in the attack, and that 10 others, including six members of the security forces, had been wounded. Local news outlets put the number of dead at 43.

The siege capped a violent 24 hours across Afghanistan, where about 50 people were killed in four provinces as the 16-year war continues to spiral more violently, with no tangible signs of a resolution.

A guest, Abdul Rauf, 48, said he had run through the halls of the hotel as an armed man was firing and had then taken cover in his room.