Shah Marai, Getty Images
Afghan guard of honor stands next to a portrait of former Afghan King Amanulla Khan during a ceremony Monday in Kabul marking the anniversary of Afghanistan's independence. After a suicide bombing that killed 12 and hurt 22, U.S. military officials worry that the country's celebration of independence from Britain may result in an increase in violence.

KABUL, Afghanistan — A suicide bomber drove a car into a crowd of workers at the gates of a U.S. military base in eastern Afghanistan on Monday, killing 12 workers and wounding 22 others, Afghan officials said.

The bomber failed to penetrate the base, and no U.S. military personnel were wounded in the explosion, the military said.

The attack came early on Afghanistan's Independence Day, commemorating liberty from the British Empire in 1919. Hours later the two top U.S. generals in Afghanistan warned of a heightened security threat to civilian, military and government targets during the independence celebrations.

In a statement, one of the generals, Maj. Gen. Jeffrey J. Schloesser, commander of the U.S.-led coalition in Afghanistan at the Bagram air base, cited "credible intelligence reporting" and asked the population to be vigilant and report suspicious behavior. Gen. David D. McKiernan, the NATO commander in Afghanistan, condemned the car bombing as a "callous and heartless attack on the people of Afghanistan on this highly significant day of national celebration."

All day Sunday and through the night, thousands of extra police officers were deployed in Kabul, checking cars and people on the streets. On Monday, President Hamid Karzai attended a closed ceremony conducted inside the well-guarded Ministry of Defense, while much of central Kabul was blocked off.

The tight security was ordered as a precaution after an insurgent attack interrupted a Victory Day military parade April 27, celebrating the defeat of the Communist government by the mujahedeen in 1992. That assault narrowly missed Karzai but killed three people.

A Taliban spokesman claimed responsibility for the suicide bombing, at the gate of Camp Salerno in the eastern province of Khost, news agencies reported. The Taliban issued a statement that Afghanistan was once more under "occupation" by "crusaders" and called on Afghans to join and fight a jihad, a holy war, Agence France-Presse reported.

In Khost, the police chief said nine people had died instantly in the bombing and three more in the town hospital. Col. Abdul Qayum Baqizoy, the police chief, said the suicide bomber had rammed his explosive-packed car into a line of laborers at a gate where they gathered to be searched before going inside.

The colonel said a second suspect in the bombing was chased by security forces who had rushed to secure the scene and help evacuate the dead and wounded. The suspect escaped, he said, and bomb disposal experts later blew up his car outside the base.