Dozens of civilian vehicles and shops were either destroyed or damaged, and several buildings were also damaged. A large plume of smoke rose from the area and the sound of sporadic gunfire could be heard.
The ministry's statement said four civilians and a police officer were killed and 24 others were wounded in the assault. It was not immediately clear if any foreigners were killed or wounded. The ministry's statement said the attack ended after all five insurgents were killed by Afghan forces. "Around 200 people were rescued from both buildings within the compound," it said.
The attack targeted U.S.-based aid organization Counterpart International, which has offices near those of the Afghan attorney general, said Interior Ministry spokesman Nasrat Rahimi. The group's offices are in a compound with two five-story buildings.
"We are incredibly saddened by this attack and are working as quickly as possible to account for our staff," the organization said in a statement on its website. "Their safety and security is our primary concern.
Johan Bass, U.S. ambassador in Afghanistan, strongly condemned the attack on the NGO. He said the targeted organization helps local communities, trains journalists and supports the Afghan people. The United Nations Assistance Mission in Afghanistan in a statement also condemned the insurgents for deliberately targeting a civilian aid organization.
"Today's attack was particularly deplorable, hitting civilians helping Afghans," the statement said. Taliban spokesman Zabihullah Mujahid said the group attacked the organization because it was involved in "harmful Western activities" inside Afghanistan, without elaborating.
Taliban insurgents stage near-daily attacks on Afghan forces, even as peace efforts have accelerated to find an end to the country's 17-year war. Afghan President Ashraf Ghani called for peace with the Taliban last week and promised to free 175 Taliban prisoners ahead of the Muslim holy month of Ramadan, which began Monday.
The Taliban said they would continue their attacks during Ramadan, but would be "very careful of civilians during any operation." The insurgents have rejected past cease-fire proposals, saying U.S. and NATO troops must withdraw from the country first. The Taliban also refuse to negotiate directly with the government in Kabul, seeing it as a U.S. puppet.