Afghan President Hamid Karzai and Pakistan's Asif Ali Zardari have said they will work towards a peace deal for Afghanistan within six months.
Speaking in Britain, after talks with Prime Minister David Cameron, they said they would "take all necessary measures" to achieve such a goal.
They backed the opening of an Afghan office in Doha and urged the Taliban to do the same for talks to take place.
The two men reaffirmed their aim to work towards a strategic partnership.
They said they hoped to sign an agreement strengthening ties on economic and security issues, including trade and border management, later in the year.
The talks - held at the UK prime minister's Chequers country retreat north of London - is the third round of discussions since Mr Cameron instigated the trilateral process last year.
Foreign ministers, military leaders and intelligence chiefs attended the talks for the first time.
Nato troops are scheduled to withdraw from Afghanistan by the end of 2014.
At a news conference with Mr Karzai and Mr Zardari, Mr Cameron said "an unprecedented level of co-operation" had been agreed between Afghanistan and Pakistan.
The discussions had centred on both the Afghan-led peace process and on strengthening co-operation between Afghanistan and Pakistan, he said.
The joint statement said all sides had agreed on the urgency of the Afghan peace process and "committed themselves to take all necessary measures to achieve the goal of a peace settlement over the next six months".
They called on the Taliban to open an office in Doha "to enter into dialogue" with the Afghan government, which has also set up a base in the Qatari city to conduct peace negotiations.
President Karzai and President Zardari also "re-affirmed their commitments" to signing a Strategic Partnership Agreement (SPA), to encourage closer ties.
Overcoming mistrust between Afghanistan and Pakistan remains a central issue, says BBC World Affairs correspondent Mike Wooldridge.
The Afghan government has made it clear that it views the recent release by Pakistan of a number of Taliban prisoners as positive, he says.
But it still wants the release of the former second-in-command of the Afghan Taliban, Mullah Baradar, in the hope that a senior figure like him could influence the Taliban to engage in talks with Kabul.
The first two rounds of the trilateral talks were held in Kabul and New York last year.