Pakistan's President Pervez Musharraf has addressed a "peace jirga" in
Gen Musharraf said both countries had to work together to "defeat the forces of extremism and terrorism".
He signed a six-point declaration with Afghan President Hamid Karzai pledging to continue the "war on terrorism".
Relations between the countries have been strained over the resurgence of the Taliban in
Gen Musharraf acknowledged that
Addressing about 700 tribal leaders from both nations, he spoke of the need to reach out to those who backed the Taliban but were not necessarily extremists.
He asked Afghans to convince their "estranged brothers and sisters" to help rebuild their country.
Conciliatory tone
The declaration signed by the two leaders called for the suppression of the illegal drug trade and the promotion of economic projects in their border areas.
They also pledged to set up a smaller 50-member jirga to meet regularly and entrench security measures as well as promoting dialogue with opposition figures.
The BBC's Charles Haviland in
Gen Musharraf adopted a conciliatory tone and spoke of the strong ties between the two countries.
He said the rise of militancy in the region was hampering efforts to improve prosperity while the rest of
He told the audience: "Our societies face a great danger [from] a small minority that create violence and backwardness.
"These forces are disrupting peace and harmony, impeding our progress and development."
Mr Karzai told the gathering that he was committed to building trust between
"I pray for the good relationship between these nations," he said.
"The result of the jirga was excellent. I am very happy we had respectful leaders from both sides in this jirga."
Both countries are allies of the
However, tribal elders from
They said that without Taliban representatives present at the talks no solution could be found.
PHOTO CAPTION