NADAHAN VILLAGE, Afghanistan -- A homicide bomb ripped through a wedding party for a family with ties to police in the Taliban's heartland in Afghanistan, killing at least 40 people and wounding dozens more, officials said Thursday.

The Taliban denied carrying out the attack, but strong suspicion fell on the insurgent group because of previous attacks and killings of people seen as allied with the government or Afghan security forces.

The blast hit in an area that is largely considered a Taliban haven, and village residents said they believed they were attacked in an air bombardment. Mohammad Rassool, a cousin of the groom, said helicopters were circling above the compound before the explosion.

NATO said no service members from the alliance were involved or operating in the area at the time of the explosion. U.S. military spokesman Col. Wayne Shanks said the deaths were not the result of an airstrike.

New British Prime Minister David Cameron -- making his first visit to Afghanistan since being elected last month -- joined President Hamid Karzai in condemning the attack. The two talked in Kabul on Wednesday about the progress of the nearly 9-year-old war.

Cameron, whose nation is the second largest contributor of NATO forces in Afghanistan with some 10,000 troops, said 2010 was "the vital year" for showing that the U.S.-led counterinsurgency was working.

"This is the year when we have to make progress -- progress for the sake of the Afghan people, but progress also on behalf of people back at home who want this to work," Cameron told a joint news conference with Karzai.

Cameron, whose coalition government is considered less invested in the war than its Labour predecessor, flatly ruled out sending more British forces.

"The issue of more troops is not remotely on the U.K. agenda," he said.

The bomb blast late Wednesday almost completely flattened the outer wall of a compound in the Arghandab district of Kandahar where male wedding guests had gathered for a meal. The windows and walls of the mud-brick dwellings were shattered and cracked. Women guests at the party were in another compound that was not hit by the explosion, witnesses said.

Interior Ministry spokesman Zemeri Bashary said children were among the dead and wounded, and that it was a homicide attack. He said at least 40 people were killed and 74 were wounded. The groom was among the injured.

The family that was attacked included a number of Afghan police officers. The groom's brother and two of his cousins were in the police force, according to another cousin, Mohammad Alkozay.

"This is a crime of massive inhuman proportions against civilians," Karzai told the news conference.

Taliban spokesman Qari Yousef Ahmadi denied the group carried out the attack.

The area is largely considered a Taliban haven, and village residents said they believed they were attacked in an air bombardment. Mohammad Rassool, a cousin of the groom, said helicopters were circling above the compound before the explosion.

NATO said no service members from the alliance were involved or operating in the area at the time of the explosion. U.S. military spokesman Col. Wayne Shanks said the deaths were not the result of an airstrike.

Kandahar -- and particularly districts like Arghandab that ring Kandahar city -- are the focus of an upcoming major NATO military operation to squeeze the Taliban out of their southern strongholds.

The Taliban have launched a counteroffensive that has included killing government officials and attacking anyone seen as allied with the government or Afghan security forces.

On Wednesday, the Taliban hanged a 7-year-old boy in public in Helmand province, neighboring Kandahar, for alleged spying, a local official said. Also Wednesday, insurgents dragged a Kandahar provincial council member, Amir Mohammad Noorzai, from his house and fatally shot him, said local government spokesman Zalmai Ayoubi.

Agha Mohammed, who survived the blast, said the guests were all seated and having a meal when the explosion occurred, sending a huge fireball and smoke into the sky.

He said the scale of the destruction caused by the blast was more than was common in a homicide attack.

At a news conference in Kandahar city, provincial Gov. Tooryalai Wesa held up a chunk of metal he said was from a homicide bomb used in the attack, and rejected the insurgents' claim of innocence.

"The Taliban are doing two things at once," Wesa said. "On one side they target people who are in favor of the government, then at the same time they don't want people to know their real face."