For nearly 24 hours, the Afghan capital became a city under siege as suicide bombers set off twin blasts in a shopping area near the Defense Ministry on Monday and gunmen stormed the offices of an international charity early Tuesday, battling security forces for 11 hours before the assailants were killed.

Officials said the first attack killed at least 35 people, including two army generals and a senior police official, and wounded more than 100. Among the casualties were shoppers, sidewalk vendors and defense employees.

The second assault, a car bombing followed by the protracted shootout at the offices of CARE International, ended with one civilian killed and dozens wounded, officials said. They said 42 civilians were rescued.

The quick succession of terrorist strikes in two heavily policed and busy parts of Kabul underscored the capital’s vulnerability to insurgent violence despite ubiquitous nighttime patrols and checkpoints. It also made a mockery of the vaunted police motto “Ring of Steel” posted at major roads leading into the city.

The Taliban asserted responsibility for the Monday bombings and later claimed that it carried out the attack on the charity, which it described as a center of foreign espionage. 

The violence came less than two weeks after insurgents bombed and stormed the prestigious American University of Afghanistan in Kabul, leaving 13 dead and scores wounded. About a month before that, a suicide bombing during a peaceful demonstration in the capital killed 80 people and wounded more than 200 .

The latest assaults highlight again the weaknesses of President Ashraf Ghani’s government, which has been unable to bring security to the country since the withdrawal of most NATO troops in 2014 and has been preoccupied by internal disputes. Critics have been calling for change at the top, including via elections or a traditional gathering of elders. 

“The situation is really alarming,” Bashir Bezhan, a political analyst in Kabul, said Tuesday night. “The city was under a semi-state of siege for 12 hours, and that caused a big psychological shock.” With Ghani and other officials “locked in a power struggle,” terrorists and criminals have free rein, and the public is in “a huge state of dismay,” Bezhan said. “The hope they had from this government is ended.”

The sense of siege in Kabul intensified as the sounds of gunfire and sirens echoed overnight Tuesday and well past midday. Security forces sealed off a large area of central Kabul for much of the day, creating a citywide traffic jam and spawning rumors about which buildings were under attack, how many people were dead and whether others were being held hostage.

By evening, officials said that the clash at CARE had ended and that 42 people, including 10 foreign nationals, had been evacuated from the compound and nearby buildings. A spokesman for Kabul police, Abdul Basir Mujahid, said traffic was being allowed to flow again through the city, while some small-business owners returned to their shops to start clearing debris.

“Life has come back to normalcy in those areas,” Mujahid said.

But little seemed normal in the stunned metropolis of 5 million. News broadcasts were flooded with images of bodies, wrecked sidewalk stalls and shopkeepers clearing glass and trampled bouquets in the alley known as Flower Street, a popular tourist attraction within a few blocks of the CARE offices. 

A tweet from CARE officials on Tuesday evening said all of the charity’s staff members were safe. But the assault is likely to send a further chill through the small community of foreign workers that has shrunk dramatically in the past several years and is now mostly confined to well-guarded compounds.

Last month, two foreign faculty members — one American and one Australian — were kidnapped outside the American University and have been missing since. 

The carnage outside the Defense Ministry, which includes a new U.S.-built headquarters often referred to as the Afghan “Pentagon,” was less visible but far worse than following the battle at CARE. Hundreds of defense workers were just getting off duty when a suicide bomber struck outside the ministry’s front gates. As shoppers and others rushed to help, a second bomb exploded, sowing mayhem and death. 

The Taliban has often targeted military and police facilities to send its deadly message against the Afghan state and its foreign backers. It rarely seeks out places full of civilians. This time, it did both, hitting a densely crowded area at peak afternoon rush hour, just steps from a famous Shiite shrine that was attacked by terrorists several years ago.

Meanwhile, the insurgents have been making steady inroads in scattered areas of the countryside in recent weeks and months. They have virtually surrounded the capital of Helmand province in the south, seized districts around the capital of Kunduz province in the north and overrun districts in a half-dozen other provinces. They are reported to control at least some districts in a majority of the country’s 34 provinces. 

Constable reported from Islamabad, Pakistan.