Gunmen fired into the tents of sleeping Chinese road workers 22 miles south of the northern city of Kunduz early Thursday, killing 11 in one of the worst attacks on foreigners since the overthrow of the Taliban in 2001.

The raid occurred in an area that had been deemed safe because Islamic insurgents have tended to concentrate their attacks in Afghanistan's south and east.

The provincial governor blamed the raid on radicals bent on destabilizing the government of President Hamid Karzai by attacking foreign and Afghan troops as well as aid and reconstruction workers ahead of elections in September.

The Taliban, the main guerrilla group opposed to Karzai's government, denied responsibility. "We were not behind this, we have not done this," said Taliban spokesman Hamid Agha.

Gen. Mohammad Dawood, the top military commander in Kunduz, said the attack was not the work of the Taliban or its allies but a disgruntled northern commander aiming to disrupt security and reconstruction. He did not name the commander.

Karzai, now visiting the United States, faces growing instability that is undermining vital assistance missions and reconstruction in the war-shattered country of 28 million people.

"For sure, this was a politically motivated act," said the Kunduz governor, Engineer Mohammad Omar. "It was carried out by the enemies of Afghanistan," he added, using a euphemism for remnants of the ousted Taliban or their allies in al Qaeda and forces loyal to a renegade warlord and former prime minister, Gulbuddin Hekmatyar.

China condemned the killings as a "brutal terrorist act" but said it had no plan to pull its workers out of the country. "The Chinese side will not yield to any form of terrorism," Foreign Ministry spokesman Liu Jianchao said.

China backed the U.S.-led war on terror after the Sept. 11, 2001, attacks but has expressed misgivings over the war in Iraq.

Attacks on Chinese overseas have been rare. But a car bomb exploded at one of neighboring Pakistan's biggest construction projects in May, killing three Chinese technicians and wounding 11 other people.

The Chinese ambassador to Afghanistan, Sun Yuxi, said before boarding a plane for Kunduz that there were 20 unidentified attackers. Omar said they used assault rifles, rocket-propelled grenades and hand grenades in the attack, which occurred at around 1 a.m. A survivor, who did not want to be identified, said the attackers first killed a police guard, then sprayed bullets into the tents.

After the assault, the two tents in the sprawling compound where the Chinese workers slept were riddled with bullet holes, and patches of dried blood stained the dusty ground.

Hundreds of Chinese construction workers are employed in Afghanistan. Insurgents have been most active in their old strongholds in the south and east, but the Kunduz raid and an attack in the northwest last week that killed three foreigners and two Afghans from the Doctors Without Borders aid group indicate that their insurgency may be spreading.