A homicide attack Tuesday in eastern Afghanistan killed 15 people and wounded 25 others, a NATO spokesman said.

There were NATO troops in the area of the attack in Khogyani district of Nangahar province but there were no alliance casualties, Maj. Martin O'Donnell said.

The militants opened up with small arms fire and rocket-propelled grenades before a homicide bomber blew himself up among a crowd that was taking cover, he said.

The attack comes amid escalating violence in Afghanistan as NATO and U.S.-led forces fight Taliban-led militants, and two days after a failed Taliban assassination attempt on President Hamid Karzai in the capital, Kabul.

"If the goal was ISAF they failed," O'Donnell said of Tuesday's violence. He speaks for the NATO-led International Security Assistance Force (ISAF) in Afghanistan. "But if the goal was to injure and kill Afghans they succeeded."

Alliance medics were treating the wounded, he said.

Abdul Mohammed, chief of police criminal investigations in Nangahar, said the bomb went off in front of the office of the district chief who was among those hurt.

He said the attack left 12 dead and 38 wounded. It was not immediately possible to reconcile the differing casualty tolls.

Militants launched more than 140 homicide attacks last year, spearheading their violent campaign against the elected government of Karzai and Western forces that support it.

Violence has intensified since the Islamist militia's ouster from power in a U.S.-led invasion in 2001, killing a record 8,000 people last year, according to the U.N. More than 1,000 people, mostly militants, have died in insurgency-related violence so far this year, according to an Associated Press tally of figures from Afghan and Western officials.

In the past two days, Afghan and foreign troops have killed at least 23 insurgents and wounded 20 others in ground battles and airstrikes in the south and east of Afghanistan, officials said.