The presidents of Pakistan and Afghanistan pledged on Sunday to work together to combat the common security threat of Taliban and Al- Qaeda militants.
Pakistani President Pervez Musharraf addressed the closing session of a gathering, or jirga, of Afghan and Pakistani politicians and tribal elders in the Afghan capital Kabul aiming to bring the two often-feuding US allies closer together.
"The joint peace jirga strongly recognises the fact that terrorism is a common threat to both countries and the war on terror should continue to be an integral part of the national policies and security strategies of both countries," said a declaration agreed by jirga delegates.
"There is no other option for both countries other than peace and unity, trust and cooperation," Musharraf told the jirga. "There is no justification for resorting to terrorism."
Afghan officials have frequently accused Pakistan of harboring Taliban and Al- Qaeda fighters to weaken its neighbor.
Pakistan denies the charge, but Musharraf acknowledged militants were operating from Pakistani tribal areas largely outside government control along the Afghan border.
"There is no doubt Afghan militants are supported from Pakistan soil. The problem that you have in your region is because support is provided from our side," he said.
Both countries pledged not to allow any sanctuaries or training centers for militants on their soil.
Musharraf pulled out of a commitment to attend the opening of the four-day jirga on Thursday, citing engagements at home.
Musharraf's appearance at the end of the conference will have gone a long way to make up for his original failure to show up. Some Pakistani tribal elders saw his absence as a blow to a meeting already hit by a boycott.
"It is a very happy event that the jirga between two countries was convened," Afghan President Hamid Karzai said in a short speech. "It is ending with good results, achievements and a message for both countries."
Analysts and diplomats warned against expecting too much from the jirga, saying it was only a first step towards a unified approach to combating militants who threaten security in both countries.
A second jirga to be held in Pakistan at an unspecified date may yield firmer results, they said.
A jirga is a traditional meeting among the Pashtun tribes that live on both sides of the border, where elders use consensus to try to peacefully settle disputes.