The top U.S. general in Afghanistan issued a rare public warning Monday to Afghans celebrating Independence Day that militants planned to attack civilian, military and government targets. Only hours earlier, a homicide bomber killed 10 Afghans outside a U.S. base.

The warning by Maj. Gen. Jeffrey J. Schloesser said "credible intelligence" indicated that militants planned to launch attacks at celebrations, which were held in the capital Kabul and other parts of the country. An increase in security and public awareness can "save Afghan lives, defeating the enemies' plan to discredit the Afghan government," a U.S. military statement said.

While Afghan, U.S. and NATO intelligence officials say they often hear of and disrupt plans by militants, rarely does the U.S. go to such lengths to publicize the threat.

Two hours before the warning was issued, a homicide bomber detonated explosives outside a U.S. base in the eastern province of Khost, killing 10 Afghan laborers and injuring 13, the U.S. military said. Security forces stopped a second car bomber from detonating his explosives.

By nightfall, there were no major attacks on celebrations in the capital, but officials warned that intelligence indicated a high threat level for the whole week.

All United Nations staff were ordered to work from home Monday as a security precaution, said spokesman Aleem Siddique.

The U.S. warning came one day after 7,000 police blanketed Kabul in advance of the 89th anniversary of independence from Britain. Even the location of the official celebration was kept secret and remained closed to the public to try to minimize the risk that insurgents could again disrupt a national commemoration.

About 100 people -- diplomats and officials -- attended the mid-afternoon ceremony in the secure compound of the Afghan Defense Ministry. President Hamid Karzai placed a bouquet of flowers on a monument in memory of fallen soldiers while a military band played the national anthem.

In April, gunmen in a rented hotel room fired on Karzai at a military parade in Kabul as he sat in the review stands. Karzai escaped injury, but the attack killed three people, including a lawmaker.

Taliban violence has spiked across Afghanistan in recent days, including an ambush on a NATO convoy on Sunday, attacks on police checkpoints and a roadside bomb targeting a police convoy. More than 90 people were killed over four days -- most of them reportedly Taliban insurgents.

The NATO-led force said an insurgent attack killed a British soldier on patrol in southern Afghanistan Monday.

Kabul so far has been spared the violence afflicting much of Afghanistan, but there are signs the Taliban and other militant groups have gained a foothold in neighboring provinces. And the capital suffered spectacular bomb attacks this year against an international hotel and the Indian Embassy.

Overall, insurgent attacks jumped by 50 percent in the first half of 2008 from the previous year, according to data from the Afghanistan NGO Safety Office, a Kabul-based group that advises relief groups on security.

More than 3,400 people -- mostly militants -- have been killed in insurgency-related violence this year, according to an Associated Press count based on figures from Western and Afghan officials.