Afghanistan's deputy chief of intelligence has been killed in a suicide attack in Laghman province, east of Kabul, officials say.
Abdullah Laghmani and at least 21 other people were killed in the attack on a mosque in the town of Mehtar Lam.
A Taliban spokesman, Zabiullah Mujahid, told AP news agency a suicide bomber had targeted Mr Laghmani.
Separately, the UN has released a report saying opium cultivation has dropped significantly in Afghanistan.
The UN Office on Drugs and Crime said poppy cultivation had dropped by 22% in a year and opium production by 10%.
Meanwhile, European and US envoys are meeting in Paris to discuss a new strategy in Afghanistan.
A unified response to allegations of fraud in the 20 August presidential election will be one of the main items on the agenda.
The latest counting figures released show that incumbent President Hamid Karzai has slightly extended his lead.
'Covered in blood'
Reports say a suicide bomber detonated his explosives in a crowd of officials - including Mr Laghmani - who had gathered outside the mosque in Mehtar Lam for a ceremony.
The provincial governor, Lutfullah Mashal, said in a news conference that at least 22 people had been killed, and another 35 hurt.
MAJOR ATTACKS IN PAST MONTH
25 Aug: At least 43 killed in massive car bombing in Kandahar city
18 Aug: Nine Afghans and a Nato soldier die and more than 50 are injured in Kabul
15 Aug: Suicide bomb outside Nato HQ in Kabul kills seven and injures 90
13 Aug: Twin blasts in Helmand and Kandahar kill 14, including several children
6 Aug: Five American and three UK soldiers, five civilians and five policemen killed by roadside bombs mainly in Helmand
3 Aug: Bomb in Herat kills 12
1-2 Aug: Nine foreign soldiers killed over weekend
He said three senior officials in the local government had been killed, as well as Mr Laghmani - whose car was completely destroyed in the attack.
Most of the rest of the dead were believed to be civilians, including three women.
A Taliban spokesman told the BBC it claimed responsibility for the attack.
Ambulances took the injured to Jalalabad, the nearest big city.
Speaking as the foreign envoys gathered for the Paris talks, French Foreign Minister Bernard Kouchner said of the attack: "This tragic event reminds us of the challenges facing the authorities and the people of Afghanistan to ensure the stabilisation of the country."
Mr Kouchner also said Western troops would not leave until the region had been made secure, AFP reported.
This successful strike against a senior figure in the state apparatus is a serious blow against the government in its fight against the insurgency, says the BBC's Damian Grammaticas in Kabul.
Mr Laghmani was the second in command in the National Directorate of Security (NDS) - the national intelligence service - and was known as an active and energetic figure in the fight against criminal and insurgent networks, he adds.
The attack underlines the Taliban's ability to carry out complex and targeted attacks.
It is the latest in a string of deadly attacks mainly in the south and east of Afghanistan, occurring in the weeks before and since the country's presidential and provincial elections.
The UN greeted the findings of its latest report on poppy and opium production in Afghanistan as a "welcome piece of good news".
The biggest falls have been in Helmand province, but levels remain higher than three years ago, when British troops began fighting the Taliban there.
But world heroin prices remain low and sceptics suggest suppliers may be depleting stockpiles to boost prices.
Vote counting is still continuing after the 20 August election.
The latest count, with votes from 60.3% of polling stations tallied, gives Mr Karzai a slightly larger lead over main rival Abdullah Abdullah, by 47.3% to 32.6%.
Mr Karzai needs 50% of the votes to avoid a run-off.
However, the vote remains mired in claims of fraud.
The New York Times carried claims on Tuesday that residents of the Shorabak district of Kandahar - members of the Bariz tribe - had been denied their votes wholesale after deciding to back Abdullah Abdullah.
Tribal leaders told the newspaper that on election day an ally of President Karzai had detained the district's governor and shut down all 45 polling sites.
They said police had stuffed the ballot boxes with fake ballots before sending them to Kabul.
The president's brother, Ahmed Wali Karzai, who heads the provincial council in Kandahar, told the BBC the accusations were absolutely baseless.
Speaking in Paris, US envoy to Afghanistan and Pakistan Richard Holbrooke said a fair election outcome was vital but that voting disputes "happen in any democracy".
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.