Emotional scenes as Burhanuddin Rabbani buried in Kabul
The funeral of Afghanistan's peace talks chief Burhanuddin Rabbani, killed by a suicide bomber, has taken place in Kabul amid tight security.
President Hamid Karzai joined mourners for the state funeral at the presidential palace.
Rabbani's body was then buried amid emotional scenes on a Kabul hilltop.
Rabbani, the chairman of the High Peace Council, was killed on Tuesday by a bomb hidden in a turban worn by a man claiming to be a Taliban envoy.
Mr Karzai told the mourners he would continue with the peace process.
"The blood of the martyred and other martyrs of freedom requires us to continue our efforts until we reach peace and stability," he said.
"It is our responsibility to act against those who are enemies of peace."
Mr Karzai accused Rabbani's killers of using "trick and deception", abusing Afghan and Islamic customs.
Servicemen with caps and white gloves had carried the coffin, draped in the national flag, to a dais state outside the presidential palace.
Officials then lined up to pay individual tribute to Rabbani, bowing at the coffin.
Rabbani's son, Salahuddin, told mourners: "Today we are witnessing one of the biggest and saddest events of this important political time in the history of the world."
There were emotional scenes as Rabbani's body arrived later at the hilltop overlooking his Kabul home for the burial service.
Gunfire was heard but police said they were firing shots into the air to disperse some in the crowd who had thrown stones at the cars of government officials.
Some chanted: "Death to America, death to Pakistan, death to Karzai."
One mourner, Enayatullah, told AFP: "We are all grieving, people here have lost a great leader."
He said those who organised the meeting with the alleged Taliban envoys should be put on trial.
The capital's diplomatic zone was in security lockdown, amid fears insurgents could try to disrupt proceedings.
Cars were banned from the area and residents and mourners were searched.
The head of Kabul's criminal investigations unit, Mohammad Zahir, told Agence France-Presse news agency: "We have taken extra measures by deploying thousands of policemen."
The BBC's David Loyn, in Kabul, says Pakistan sent two ministers to the funeral, but not its prime minister, and there is growing anger in Afghanistan at Pakistan's influence over militants.
He says tension has been heightened by the comments of the outgoing chairman of the US Joint Chiefs of Staff, Mike Mullen, blaming Pakistan's spy agency for backing recent militant attacks in Afghanistan.
No group has said it carried out Rabbani's killing but Afghan intelligence officials say they believe it must have taken months to plan.
The peace council had been in touch with a man purporting to represent the Taliban high command based in the Pakistani city of Quetta, and who said he would send a messenger to Kabul.
The peace council believed it was on the verge of a major breakthrough in peace talks with the Taliban, officials said, and Rabbani cut short a visit to Dubai to meet the envoys.
On Wednesday, the Taliban issued their first public statement on the killing, saying they did not want to comment.
Rabbani was instrumental in the establishment of the Afghan mujahideen who took on the Soviet invaders in the 1980s.
He later became president but was ousted by the Taliban in 1996. After that he became the nominal head of the Northern Alliance.
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.