Afghanistan and Pakistan agreed on Monday to step up coordinated efforts against terrorism and set up a committee to boost confidence-building measures between the two troubled neighbours.
Afghan President Hamid Karzai and his Pakistani counterpart Pervez Musharraf agreed to "deny sanctuary, training and financing to terrorists and to elements involved in subversive and anti-state activities in each other's countries," in a joint statement after talks mediated by Turkish leaders.
They pledged "to initiate immediate action on specific intelligence exchanges" as part of their commitment, it said.
Monday's talks, the first between Karzai and Musharraf since September 2006, were aimed at easing bilateral tensions over the fight against the Taliban militia, which Kabul accuses Islamabad of tacitly supporting.
The two leaders, who traded harsh accusations ahead of the meeting -- including Musharraf calling Karzai a "liar" -- did not shake hands as they appeared before the media.
Instead, they stood on either side of Turkish President Ahmet Necdet Sezer, who held their hands and raised them as they posed for photographers.
Sezer and Prime Minister Recep Tayyip Erdogan also attended the tallks.
Karzai and Musharraf agreed to set up a three-way committee of high-level officials, including Turks, to monitor progress on bilateral issues and boost confidence-building measures between their countries, the declaration said.
They welcomed the idea of meeting again in Turkey in either late 2007 or early 2008, Sezer told reporters.
Karzai and Musharraf did not speak to the press and did not take questions.
The two key US allies in the war against terrorism last met for talks in Washington in September, when US President George W Bush tried to reconcile them, with no apparent success.
Tensions simmered between them ahead of the Ankara talks, with Musharraf angrily dismissing Afghan claims that Pakistan's ISI secret intelligence service was helping the Taliban.
"Those who do nothing against terrorism, like Karzai, are also the ones who criticise those who are fighting, like us," Musharraf told the media. "Those who say that the ISI helps the Taliban because we want a weak Afghanistan are liars."
Pakistan, once the main backer of the Taliban regime, reversed its policy in the wake of the September 11, 2001 attacks on the United States. Since then, it has deployed 90,000 troops in sensitive border areas in a bid to stop Pakistan-based militants entering Afghanistan.
Many in Afghanistan remain skeptical, saying Musharraf cannot or will not rein in elements of his military intelligence who allegedly support the Sunni extremist Taliban.
Islamabad insists it has taken effective measures and accuses Afghanistan of trying to shift the blame away from its own failures to tackle a booming drug trade and warlords who are undermining the government's authority.
The Pakistani government has also been criticised for striking peace deals with local militants in its tribal belt bordering Afghanistan.
Islamabad says the deals are designed to control cross-border activity, but Kabul says they have failed to stop western Pakistan serving as a safe-haven for extremists.
Pakistan has also angered Afghan officials by starting work on a 35-kilometre (22-mile) fence on the disputed frontier.
There are nearly 50,000 US and NATO troops in Afghanistan to fight the Taliban, whose five-year regime was based on a radical interpretation of Islamic law and who gave sanctuary to Al-Qaeda.
Karzai and Musharraf were scheduled to leave Ankara later in the day after lunch with Erdogan.
NATO member Turkey has traditionally close ties with both countries. It has contributed troops to the the international force in Afghanistan.