KABUL, Afghanistan — A complex Taliban attack including a car-bombing and militant assault killed at least 40 people in Kabul on Monday, badly damaging a private war museum, an adjoining television station and a primary school, hurting dozens of children, officials said.

The attack, apparently aimed at a government facility, came as American and Taliban negotiators met for a third day in Qatar amid hopes for a deal on an American troop withdrawal. But the pace of violence in the 18-year Afghan war has only picked up, with each side increasing attacks.

A senior Kabul defense official put the death toll at six security force members, with an additional 20 of them wounded, and 34 civilians, with at least 63 civilians wounded, a toll that rose later in the day. He spoke on the condition of anonymity because he was not authorized to release the information.

Nooria Nazhat, the spokeswoman for the ministry of education, said that at least 51 students were wounded, including many young children. They were injured when part of their school building near the attack site collapsed from the detonation of a car bomb which began the Taliban attack.