Hamid Karzai, the Afghan president, has vowed to continue efforts to make peace with the Taliban in a speech at the funeral of the government's assassinated peace broker, Burhanuddin Rabbani.
Karzai gave a short speech on Friday at the state funeral for Rabbani, who was murdered by a suicide bomber wearing explosives in his turban who visited his Kabul home on Tuesday, claiming to be a Taliban emissary.
"The blood of the martyred [Rabbani] and other martyrs of freedom requires us to continue our efforts until we reach peace and stability," he said.
But he cautioned that while peace efforts would continue, "at the same time time, we consider it our responsibility to fight the enemies of peace with determination".
The Taliban has not claimed responsibility but officials say the group was behind the assassination of Rabbani, a former president and chairman of Karzai's hand-picked High Peace Council, which was seeking to reconcile the country's warring factions.
Rabbani was buried at a hilltop cemetery in Kabul as his grieving followers vilified Karzai, blamed Taliban insurgents for Afghanistan's woes and denounced Pakistan for allegedly stirring up the conflict.
Shouts against the United States, which backs the government, reflected frustration that a decade of Western support has failed to unite their divided land.
Police fired into the air to disperse the crowd. "There is no security threat, the situation is under control," Mohammad Zahir, head of the Kabul police Crime Investigation Unit, told the Reuters news agency.
"Many people gathered near the hilltop to attend the burial but they had not been searched or checked. Police fired into the air to disperse the crowd."
Police, some in armoured vehicles, and intelligence agents lined the streets while a large security cordon was in place in the area near Rabbani's home from which cars were banned and where pedestrians were being searched.
Yousuf Raza Gilani, the Pakistani prime minister, flew to Kabul on Thursday to pay his respects after Rabbani's death but was not expected to stay for the funeral.
His country, which most Afghans regard with deep suspicion for its historic ties to the Taliban and which some Afghan analysts have accused over Rabbani's killing, was to be represented by two minor cabinet ministers.
Pakistani officials said they were shocked by the killing and point the finger at Taliban factions in Afghanistan.
The killing was widely seen as a strong statement of Taliban opposition to peace talks and the latest in a
string of assassinations to shake the confidence of ordinary Afghans that security can be maintained as foreign forces withdraw.