The three presidents are to meet in the Turkish capital
Afghan President Hamid Karzai and his Pakistani counterpart, Asif Ali Zardari, have agreed to boost military cooperation against Islamic extremists.
The meeting in Ankara was hosted by the Turkish President, Abdullah Gul.
Afghan officials have previously said that insurgent attacks inside Afghanistan are planned in Pakistan.
A BBC correspondent says relations have improved since President Zardari came to power but Turkey's role as a broker could further improve ties.
The meeting between the two leaders comes a day after 70 countries committed themselves to more effort in reconstructing Afghanistan at a conference in The Hague.
Mr Gul said the involvement in the meeting of Pakistani and Afghan military and intelligence chiefs had been important.
Mr Karzai picked out Turkey for particular praise in his address to the conference.
The BBC's international development correspondent, David Loyn, says this Muslim country that looks to the east and the west was a natural place to host the first meeting between Pakistan and Afghanistan since President Obama announced his new strategy for the region last Friday.
Mr Karzai has a much closer working relationship with Mr Zardari than with the previous administration in Islamabad.
But democratic government in Pakistan is not deep-rooted and Mr Zardari has not yet been able to convince the US that his security services have stopped their former support for militant groups fighting in Afghanistan.
He remains vulnerable to any suggestion that his government is being pressurised to act by Washington.
That is why, our correspondent says, Turkey may prove useful in the role of an honest broker.
The US demand for better regional cooperation on Afghanistan received what US Secretary of State Hillary Clinton said was a promising response from Iran.
The head of the Iranian delegation in The Hague, Mehdi Akhundzadeh, had a brief meeting with US regional envoy Richard Holbrooke and offered assistance in stopping drug smuggling across the Afghan border.
In a meeting in Turkey last December, Mr Karzai and Mr Zardari agreed to form a joint strategy to fight militant groups operating in their border regions.
The Afghan-Pakistani border is believed to be a safe haven for the Taleban and al-Qaeda militants.
The US says insurgents use the territory to launch attacks against coalition forces in Afghanistan.