The Taliban announced the start of its "spring offensive" yesterday just hours after the US President, Barack Obama, promised to "finish the job" and end the war in Afghanistan on a flying visit to the country.
Suicide bombers killed at least seven people in Kabul, which the Taliban claimed it had organised in response to Mr Obama's surprise trip.
The attack on The Green Village in eastern Kabul, where many foreign contractors are housed, started just after 6.30am when a suicide attacker rammed an explosives-laden car into the compound's exterior.
Reports said three militants managed to penetrate the outer rim of the compound, entering a laundry room, where they battled Afghan security forces and were eventually killed.
The attack claimed the lives of seven others including one guard at the camp, four Afghan civilians and two students on their way to class, according to the Kabul police chief, Ayub Salangi. Another 17 people were injured.
Mr Obama arrived in Afghanistan shortly after midnight yesterday to sign a strategic partnership agreement with the Afghan President, Hamid Karzai, and address American television viewers via video-link on the first anniversary of the killing of the former al-Qa'ida leader Osama bin Laden.
In his address, Mr Obama said the agreement "set a goal for Afghan forces to be in the lead for combat operations across the country next year," ahead of the planned withdrawal of Nato troops from Afghanistan by the end of 2014.
"I will not keep Americans in harm's way a single day longer than is absolutely required for our national security, but we must finish the job we started in Afghanistan, and end this war responsibly," he said. He later spoke of a the possibility of achieving a "negotiated peace" with the Taliban.
In a statement posted on the group's website, Taliban spokesman Zabihullah Mujahid said that yesterday's attack was "planned hurriedly after finding out about Obama's 'surprise visit' to Afghanistan".
However, analysts in Kabul speculated that militants may have planned the attack for some time to mark the first anniversary of the raid that killed Bin Laden.
In a separate statement, the Taliban also announced that its spring offensive would officially begin today. It said insurgents would target the foreign military, government officials and members of the High Peace Council.
The Taliban launch their spring offensive every year after the winter, when it is easier to travel and fight. This year it promised "new and tested war tactics" and added that the "top priority will be given to safeguarding the lives and wealth of civilians".
Civilian casualties hit a record high last year, with a total of 3,021 non-combatants killed in the conflict, according to UN figures. The Taliban was held responsible for 77 per cent of those deaths.
The Taliban leader, Mullah Omar, has repeatedly pledged to avoid killing civilians but insurgents have increasingly come to rely on using roadside bombs in their campaign of violence.