Afghan president visits Pakistan to reset troubled ties
Afghan President Ashraf Ghani has held talks with members of Pakistan's security forces on a trip to Islamabad.
It is Mr Ghani's first visit to Pakistan since taking office in September and is being seen as a chance to reset troubled ties.
His predecessor, Hamid Karzai, routinely criticised Pakistan for sheltering militant groups.
Pakistan always rejected such complaints and accused Afghanistan of failing to stop cross-border attacks.
Officials on both sides hope this visit will provide a fresh start.
In the run-up to the visit, Pakistan's powerful army chief Raheel Sharif, and later the new chief of the country's main intelligence agency the ISI, have held talks in Kabul.
During a visit to the military's general headquarters in Rawalpindi, near the capital Islamabad, Mr Ghani discussed ways of working together to tackle terrorism.
Mr Ghani is also meeting Pakistan's prime minister and president.
Analysis: Richard Galpin, BBC News, Kabul
Since becoming president at the end of September, Ashraf Ghani has visited China, Saudi Arabia and now Pakistan.
All three countries could play a vital role in bringing about peace talks between the Afghan government and the Taliban, one of President Ghani's top priorities, as the bulk of foreign troops leave Afghanistan.
China is already reported to have offered to set up a peace and reconciliation forum to bring the two sides together. Pakistan's position is vital. It's long been accused of sheltering the Taliban leadership and supporting the insurgency in Afghanistan.
But Western diplomats believe the political transition in Kabul, with a new president in place, provides an opportunity for relations to be put on a new, much more positive footing.
Pakistan says its current military offensive in the tribal region of North Waziristan is an evidence of its commitment to destroy militant safe havens.
Its foreign ministry spokeswoman Tasnim Aslam said that during Mr Ghani's visit the two sides would discuss improving economic ties, border security and counter-terrorism.
"Peace and stability in Afghanistan are in Pakistan's vital interest," Ms Aslam was quoted as saying by the AP news agency.
While Islamabad insists it wants to see a stable and peaceful Afghanistan, it remains wary of its traditional rival, India, expanding its influence along the border in Afghanistan, the BBC's Shahzeb Jillani in Karachi points out.