KABUL, Afghanistan — A pair of coordinated Taliban bombings targeted the Afghan Defense Ministry in a crowded neighborhood of Kabul on Monday, officials said, killing at least 24 people and wounding dozens, among them senior security officials.

Sediq Sediqqi, a spokesman for the Interior Ministry, said an army general and a police colonel in charge of the area’s security were among the dead. Other officials said the deputy director of President Ashraf Ghani’s elite protection force had also been killed.

At least 50 people were wounded, Mr. Sediqqi said. A spokesman for the Health Ministry put that number at 91.

Hours later, just before midnight, a third explosion shook much of the city. Witnesses said that a car bomb had exploded outside a guesthouse near Kabul Bank, in the downtown Shar-e Naw neighborhood, and that gunmen had then tried to enter the house. Police special forces rushed to the scene, and sporadic gunfire could be heard.