The leaders of Afghanistan and Pakistan have said they would work to reach a peace deal within six months, while throwing their weight behind moves for the Taliban to open an office in Doha, Qatar.

Following talks on Monday hosted by British Prime Minister David Cameron, Afghan President Hamid Karzai and his Pakistani counterpart Asif Ali Zardari urged the Taliban to join the reconciliation process in Afghanistan.

"All sides agreed on the urgency of this work and committed themselves to take all necessary measures to achieve the goal of a peace settlement over the next six months," they said in a joint statement issued by Cameron's office.

"They supported the opening of an office in Doha for the purpose of negotiations between the Taliban and the High Peace Council of Afghanistan as part of an Afghan-led peace process," the statement said.

But with no Taliban representative at the tripartite talks and with the fighters still refusing to talk to Kabul, analysts said the commitment by the three leaders risked being one-sided.

'Strengthen co-ordination'

Karzai had previously shunned the idea of a Taliban office in Qatar because of fears that it would lead to the Kabul government being left out of talks between the United States and the Taliban.

The joint statement also said that the Afghan and Pakistani leaders had agreed on arrangements to "strengthen coordination" of the release of Taliban detainees from Pakistani custody.

Karzai told the press conference he hoped in future to have "very close, brotherly and good neighbourly" relations with Pakistan, which has been regularly accused by both Kabul and Washington of helping to destabilise Afghanistan.

Support from Pakistan, which backed Afghanistan's 1996-2001 Taliban rule, is seen as crucial to peace after NATO troops depart, but relations between the neighbours remain uneasy despite some recent improvements.

Zardari said it was in Islamabad's interest to support the initiative.

"Peace in Afghanistan is peace in Pakistan. We feel that we can only survive together," he said. "We cannot change our neighbourhood or our neighbours."

Afghan peace negotiators have welcomed Pakistan's release of dozens of Taliban prisoners in recent months, a move they believe could help bring the group to the negotiating table.

There was no immediate reaction from the Taliban.

The summit was the third trilateral meeting in a year following meetings in Kabul in July and New York last September, but the first in which Pakistani and Afghan army and intelligence chiefs took part.