Afghan officials say two security guards died as suicide bombers attacked the headquarters of the national intelligence service in Kabul.
Afghan police say a vehicle loaded with explosives blew up outside the gate of the National Directorate of Security around noon on Wednesday, causing a blast that sent a plume of smoke into the air. Five other attackers with explosives were shot and killed as they piled out of a second vehicle and tried to enter the compound.
Police said the second vehicle was also loaded with explosives, which they defused.
The intelligence headquarters is located near other government buildings in Kabul, including Afghanistan's interior ministry.
Officials say about 30 people were wounded in the blast, which sent glass and metal spewing from nearby shops.
The Taliban claimed responsibility for the attack in a text message to news outlets.
Afghan President Hamid Karzai returned just days ago from a trip to Washington, where he held talks on Afghan security with U.S. President Barack Obama.
This was the second attack on the intelligence agency in two months. On December 6, a suicide bomber posing as a peace envoy blew himself up in an attempt to assassinate intelligence chief Asadullah Khalid. Khalid is still recovering from his injuries.
Attacks on Afghan authorities have been increasing in the lead-up to the withdrawal of international security forces from Afghanistan. The NATO peacekeeping force is set to hand over security responsibility to Afghan forces by 2014.