KABUL, Afghanistan — Taliban insurgents carried out a bold assault on a remote base near the border with Pakistan on Sunday, NATO reported, and a senior U.S. military official said nine U.S. soldiers were killed.

The attack, the deadliest against U.S. forces in Afghanistan in three years, illustrated the growing threat of Taliban militants and their associates, who in recent months have made Afghanistan a far deadlier war zone for U.S.-led forces than Iraq.

The assault on the U.S. base in Kunar province was one of the fiercest by insurgents since the U.S.-led invasion of Afghanistan routed the Taliban and al-Qaida militants in late 2001.

"It all goes back to the problem set that there are sanctuaries in the tribal areas that militant insurgent groups are able to operate from with impunity," said Gen. David D. McKiernan, the new U.S. commander of NATO forces in Afghanistan, who took over the NATO-led International Security Assistance Force in June.

A NATO news release issued in Kabul said the insurgents attacked the Kunar base with rocket-propelled grenades and mortars, using houses, shops and a mosque in the nearby village of Wanat for cover. Both sides suffered casualties as the insurgents were repulsed, it said.

McKiernan said insurgents based in Pakistan had carried out some kind of attack on Afghanistan "almost every day I have been here."

It was the first time a senior commander had stated so clearly that militant groups were not only infiltrating from across the border to attack but were also firing from positions inside Pakistan.

The Kunar attack also left wounded at least 15 other NATO soldiers — almost certainly Americans — and four Afghan soldiers, and it was one of at least three significant attacks on Sunday, including a devastating suicide bombing in a southern city's bazaar that killed at least 25 people, 20 of them civilians.

This year of the Afghanistan war is already proving to be the deadliest since the U.S.-led invasion. Bush administration officials are considering a redeployment of troops to Afghanistan from Iraq to help deal with the rising threat.

Deaths of U.S. troops and their allies for the last two months have been higher than those inflicted in Iraq. In addition, nearly 700 Afghan civilians were killed in the first five months of the year, a marked increase over previous years, U.N. officials have said.