The chairman of the Afghan High Peace Council, Burhanuddin Rabbani, has been killed with several other people in a bomb attack in Kabul, officials say.
Mr Rabbani was killed at his home by a suicide attacker who officials believe had concealed a bomb in his turban.
He was meeting members of the Taliban at the time. The council leads Afghan efforts to negotiate with the Taliban.
Mr Rabbani is a former president of Afghanistan and also led the main political opposition in the country.
A senior adviser to the peace council, Masoom Stanakzai, is also thought to have been seriously wounded in the attack.
On hearing the news Afghan President Hamid Karzai decided to cut short his visit to the US but briefly met President Barack Obama, who condemned the killing as a "tragic loss". Both men reinforced their determination to continue the quest for peace.
President Karzai said: "This is a sad day for us in Afghanistan but a day of unity and day of continuity for our efforts."
Abdullah Abdullah, the leader of the opposition in the Afghan parliament, said Mr Rabbani's killing was "a big loss for all the people of Afghanistan", describing the former president as a man who "strove until his last breath to bring peace".
Nato and the International Security Assistance Force (Isaf) condemned the attack, with Isaf commander Gen John R Allen saying that "the face of the peace initiative has been attacked".
Mr Rabbani's residence is in a prosperous district of Kabul, on the edge of a high security area close to the US embassy and the district where the Taliban launched a 20-hour attack last week, leaving 25 dead.
The attack is likely to fuel concerns over security in the capital. Security forces have closed off a number of streets in the district and the police are out in force, reports say.
Speaking to the BBC's Bilal Sarwary in Kabul, counter-terrorism officials described the sequence of events leading up to the killing.
They said two Taliban commanders had arrived with Mr Stanakzai in a red Corolla to meet Mr Rabbani.
The commanders told household staff that they had special messages from the Taliban for Mr Rabbani.
The officials added that as guards approached to search the men, Mr Stanakzai shouted: "We know them. They are our own people."
As one of the Taliban commanders went to embrace the former president, he detonated explosives concealed in his turban.
"No-one was checked. Shortly after that we heard an explosion. Everyone started shouting: 'They killed Ustaad Ustaad [a term of respect]'," a member of Mr Rabbani's household said.
''One of the attackers' heads is missing. The second attacker is arrested but he is injured. The driver was arrested before he could flee," intelligence sources told the BBC.
Our correspondent adds that Tuesday's meeting with the Taliban commanders had been kept secret, with some of Mr Rabbani's aides being informed about it just a few hours before it had begun.
He says Mr Rabbani had returned to Afghanistan from abroad a few days ago specifically for the meeting.
When the High Peace Council was set up in October 2010, Mr Karzai described it as the greatest hope for the Afghan people and called on the Taliban to seize the opportunity and help bring peace.
But many members of the council are former warlords who spent years fighting the Taliban and their inclusion led to doubts as to whether it could succeed in its mission.
Mr Rabbani was ousted as president by the Taliban in 1996. After that he became the nominal head of the anti-Taliban Northern Alliance, made of mostly non-Pashtun ethnic groups.
When they swept back into Kabul, backed by US forces, and toppled the Taliban in 2001, he was still recognised by the UN as the official president of Afghanistan.
Series of assassinations
But he was a controversial figure who had many enemies, including the Taliban, the BBC's David Loyn in Kabul says. Many were surprised when Mr Rabbani was put in charge of peace talks.
In the 1970s it was Mr Rabbani who founded the parties that ended up becoming the Afghan mujahideen who took on the Soviets, and many blame him and his friends for the death and destruction of the civil war days.
Although people will mourn his violent death, there are also many who will celebrate it, our correspondent adds.
However, analysts say, his death will not necessarily prevent peace talks from continuing.
The killing is the latest in a series of assassinations of senior politicians and security commanders across the country.
In July, President Karzai's half-brother Ahmed Wali Karzai was killed at his home in Kandahar, southern Afghanistan, by his own head of security. Two months earlier, Gen Daud Daud, the top police commander in northern Afghanistan was killed in a suicide bomb attack.
The Taliban have claimed responsibility for most of these killings.