The Taliban claimed responsibility for a dawn attack on a US consulate in Afghanistan Friday that killed at least three locals, and that underlines continued security woes in the country 12 years after the US intervened there.

The attack may also underline for critics the risks of striking Syria, as the US scrambles to respond to the alleged use of chemical weaponry in late August by Syrian President Bashar al-Assad.

The event took place in Herat in the western part of Afghanistan reports Reuters, when a bomb in a truck exploded outside the gates of the US consulate and a gunbattle between security forces and gunmen ensued.

The US State Department said in a statement that a truck approached the US consulate at 5:30 a.m. local time with a group of attackers carrying rocket-propelled grenades and assault rifles.

They opened fire on the consulate before the truck exploded, damaging the front gate. "It appears American and contract security personnel addressed any attackers who managed to enter the compound," the statement read. "It appears some attackers were wearing suicide explosive devices."

Violent incidents in Afghanistan have been on the rise as US and allied forces begin to draw down and then formally depart in 2014. As the BBC notes: “This attack – carried out in the shadow of the anniversary of 9/11 – is a demonstration of the ability of insurgents still to disrupt Afghanistan 12 years after the US toppled the Taliban.”

A US embassy spokesperson said from Kabul that all US personnel in the area were safe. Local officials on the ground say that three Afghans have been killed, including a police officer and translator, and 17 others injured in the attack.

The Taliban issued a statement shortly after the attack saying: "Our aim for this attack is to show the Americans that they are not safe anywhere in this country.”

As the US withdraws troops and plans to depart entirely by next year, insurgent strikes have been on the rise. They have spread from the country's south and east, to the relatively more peaceful areas in the north and west.

The Los Angeles Times notes that the Taliban aims to hasten the departure of foreign troops, “allowing it to boast of success in protecting national sovereignty and to strengthen its hand against rivals in the post-2014 political landscape.”

The attack comes as the world weighs how to respond to an alleged chemical attack near Damascus by Mr. al-Assad's government on August 21.

US President Obama has insisted that a military response would be limited in nature and not turn into years-long affairs such as those in Iraq or Afghanistan.

"This is not Iraq and Afghanistan. This is not Libya, a sustained air campaign," White House Chief of Staff Denis McDonough said on "Fox News Sunday."

"This is not boots on the ground," Mr. McDonough added. "This is a targeted effort to reinforce a prohibition that goes back nearly 100 years. A prohibition that has benefited our troops greatly, by the way."

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

But many Americans disagree, including the majority of Iraq and Afghan war vets in the US Congress, reports the Washington Post.

Facing a public opinion backlash, the US has been exploring a disarmament plan with Russia for Syria. US and Russian foreign ministers are in a second round of talks in Geneva over how to secure Syria's chemical weaponry, even as US officials, as well as French officials who have been the strongest supporters of a US-led strike, say that an eventual intervention is not off the table.