Militants stormed a building housing an international aid organization in Kabul, provoking an overnight firefight with security forces in which three gunmen and one civilian were killed, Afghan officials said Tuesday.

The attack took place a day after twin bombings near the Afghan Defense Ministry killed at least 24 people and wounded more than 90 others.

Police special forces killed all three gunmen involved in an overnight attack in the Shar-e Naw district of the Afghan capital, Sediq Sediqqi, a spokesman for the Afghan interior minister said. At least one civilian was killed and six others were wounded as a result of the attack, he said.

An Interior Ministry statement said that a suicide car bombing struck close to a building belonging to the charity CARE International in Shar-e Naw late Monday night, after which three more attackers entered the building.

"Police special forces immediately reached the site of the attack and started rescuing people from the building .... 42 people who were trapped were evacuated by the security forces," the statement said.

The area is home to several guest houses and many foreigners and diplomats reside there. Security forces have blocked all the roads leading to Shar-e Now.

The shooting comes after at least 24 people were killed Monday in twin bombings near the Afghan Defense Ministry. Two security force generals were among those killed in the attack, which was claimed by the Taliban.

Public health ministry spokesman Ismail Kawasi said another 91 people were wounded in the attack in central Kabul. Sediqqi, the Interior Ministry spokesman, said a district police chief and five other police officers were killed.

Deputy defense ministry spokesman Mohammad Radmanish said the second bombing was caused by a suicide attacker who struck the area of the first blast after security forces had gathered there. He said the attack took place as ministry employees were leaving their offices for the day. Senior police investigator Faredoon Obiadi said the suicide attacker was wearing military uniform.

A district police chief and an army general were among those killed in the attack, three officials told The Associated Press. They spoke on condition of anonymity because they were not authorized to release the information. Dozens of ambulances raced to the scene after the blasts, and security forces blocked off roads leading to the area.

Ashuqullah, 34, who like many Afghans has no surname, described the scene of chaos he witnessed.

"The second explosion was so strong, and many people, including security officials, were killed and wounded," he said.

President Ashraf Ghani condemned the attack in a statement, saying "the enemies of Afghanistan have lost their ability to fight the security and defense forces of the country and thus attack highways, cities, mosques, schools and common people."

Taliban spokesman Zabihullah Mujahid said his group had carried out the attack. The insurgents have been fighting to overthrow the U.S.-backed government for 15 years, and frequently target Afghan security forces.