One person was killed and six were injured in an attack on the offices of an international charity in the centre of the Afghan capital, Kabul.
A suicide bomber targeted the humanitarian organisation Care in the Shar-e-Naw area and gunmen then stormed the building, Tolo News TV reported.
After hours of gunfight, security forces killed all insurgents, said Ministry of Interior spokesman Sediq Sediqqi.
"Forty-two people including 10 foreigners were rescued," Sediqqi said on Twitter.
The attack started with a car bomb that ripped through the city. Gunmen then reportedly stormed the building.
Earlier, a series of blasts left at least 24 people dead and nearly 100 others wounded.
An army general and two senior police officers were among the dead from those attacks, a ministry of defence spokesperson told the BBC.
The Taliban, who have carried out frequent attacks in Kabul, said they were responsible for the blasts.
IMAGE: Smoke rises from the site of an attack in Kabul, Afghanistan. Photograph: Mohammad Ismail/Reuters
Twin Taliban suicide blasts strike Kabul; 24 killed, 91 injured
Attack on American University in Kabul leaves 12 dead
80 dead, 231 injured in Kabul suicide attack
Two Indians killed in Kabul blast
Indian woman rescued from captors in Afghanistan, returns home