Updated

British Prime Minister David Cameron made an unannounced visit to Afghanistan on Saturday, backing talks with the Taliban after his top general said the West missed a chance to strike a peace deal 10 years ago.

Cameron visited troops in the southern province of Helmand before meeting with President Hamid Karzai as the Afghan government and international powers try to revive peace efforts that recently collapsed in ignominy.

"You can argue about whether the settlement we put in place after 2001 could have been better arranged. Of course you can make that argument," Cameron told Sky News in response to remarks by General Nick Carter, the senior British officer in Afghanistan.

Carter told Saturday's Guardian newspaper that an opportunity to try to bring peace to Afghanistan was missed when the Taliban were on the defensive in 2002 after they were ousted following the 9/11 attacks.

"The Taliban were on the run," Carter said. "At that stage, if we had been very prescient, we might have spotted that a final political solution... would have involved getting all Afghans to sit at the table and talk about their future."

Carter, deputy commander of the NATO-led coalition, acknowledged it was "easy to be wise with the benefit of hindsight" but Afghanistan's problems were political issues that "are only ever solved by people talking to each other".

More than a decade on, the search for a peace settlement is now an urgent priority as 100,000 US-led NATO troops prepare to exit next year and Afghan forces take on the fight against the rebels.

"The Taliban... are beginning to realise that they are not going to secure a role in Afghanistan's future through terror and violence, but by giving up their arms and engaging in a political process," Cameron told reporters in Kabul.

"This peace process is for Afghanistan to determine... there is no other agenda, that Britain has, that America has, or any country in the West has," the premier said at a joint press conference with Karzai.

A Taliban office in Qatar that opened on June 18 was meant to foster talks but instead triggered a diplomatic bust-up when the insurgents used the title of the "Islamic Emirate of Afghanistan" from their 1996-2001 reign.

Karzai, furious that the office was being styled as an embassy for a government-in-exile, broke off security talks with the Americans and threatened to boycott any peace process altogether.

Karzai said on Saturday that the security talks, which would allow Washington to maintain soldiers in Afghanistan after the NATO combat mission ends, were still suspended.

He repeated that a loya jirga -- a gathering of tribal leaders and other civic representatives -- would decide on signing the bilateral security deal.

"President (Barack) Obama hopes to get the security pact between Afghanistan and America by October," Karzai said. "The (Afghan) people will decide to accept or reject it."

Obama recently said he anticipated "a lot of bumps in the road" but that a peace settlement was the only way to end the violence in Afghanistan.

More than 3,300 coalition personnel have been killed in Afghanistan since 2001, peaking at 711 deaths in 2010, according to the independent icasualties.org website.

Only hours after the Qatar office opened, a Taliban rocket attack killed four Americans on the largest military base in Afghanistan. Days later, a suicide squad targeted the presidential palace and a CIA office, in the most audacious assault in Kabul in years.

The capital's airport, its Supreme Court and an international aid group's compound have also been attacked in recent weeks by heavily-armed Taliban suicide bombers.

"The attack that was organised near the presidential palace will not deter us from seeking peace," Karzai said. "We want to talk peace... because that is what the country needs, that is what also the Taliban need."

As NATO troops pull back, Afghan soldiers and police are taking on the Taliban, who were deposed in 2001 for sheltering Al-Qaeda leaders behind the 9/11 attacks on New York and Washington.

"There's a long way to go but, alongside our security process of a big and secure Afghan army and police force, a political process makes sense too," Cameron said.

Peace talks with the Taliban were previously anathema to many Western leaders, with Cameron's predecessor Gordon Brown vowing in 2007 that Britain "will not enter into any negotiations with these people".