Afghanistan's intelligence chief has been wounded in an assassination attempt in Kabul, the capital.
Asadullah Khalid, who heads the National Directorate of Security (NDS), was badly wounded when a suicide bomber posing as a peace messenger set off explosives at a NDS guest house, officials said on Thursday.
"The bomber was a peace messenger sent by the Taliban to the Afghan government, around 3pm in a meeting with the head of NDS, detonated his explosives," said NDS spokesman Shafiqullah Tahiri.
"Right now the head of the NDS is in good condition. The surgery was a success."
The Afghan Taliban claimed responsibility for the bombing, which highlighted Afghanistan's instability as US-led NATO troops prepare to withdraw by the end of 2014.
President Hamid Karzai visited the medical facility where Khalid had surgery.
"Thank God, he's OK. It's positive," President Hamid Karzai told reporters. "Now there is hope that he'll get healthy again."
'Skeletons in his closet'
A former cabinet minister and a key anti-Taliban figure, Khalid was nominated to head the NDS by Karzai in August, and approved by parliament despite objections from Western rights groups and accusations that he tortured detainees.
His appointment was interpreted as part of an effort by the president to secure his power base before anointing a successor to stand for election in 2014.
"He comes with skeletons in his closet," Al Jazeera's Bernard Smith, reporting from Kabul, said.
"He was previously the minister of border and tribal affairs, and in that role, he was accused by others - including a Canadian diplomat - of being involved in torture and drug trafficking."
Amnesty International had urged parliament to delay its approval of Khalid, asking politicians to investigate claims of his "involvement in numerous alleged acts of torture and other grave human rights violations".
The NDS plays a crucial role in the fight against the Taliban, who were ousted from power by a US-led invasion in 2001 for harbouring Osama bin Laden, the former al-Qaeda leader, after the September 11, 2001 attacks on New York and Washington.
Their influence on the conduct of the war is likely to grow as the US and NATO withdraw the vast bulk of their combat troops from the country by the end of 2014 and hand responsibility for the war to Afghan security forces.
Afghan police and other security forces are increasingly becoming targets of Taliban attacks as they take a bigger role in the fight ahead of the NATO withdrawal.
Thursday's bombing was reminiscent of the September 2011 killing of former Afghan President Burhanuddin Rabbani, who at the time was the leader of a government-appointed peace council seeking reconciliation with armed groups.
In that attack, an attacker posing as a Taliban peace envoy detonated a bomb that was hidden in his turban as he met Rabbani at his home in Kabul.