Image caption The Afghan army has been growing in size and capability

Nato has handed over security for the whole of Afghanistan for the first time since the Taliban were ousted in 2001.

At a ceremony in Kabul, President Hamid Karzai said that from Wednesday "our own security and military forces will lead all the security activities".

Observers say the best soldiers in the Afghan army are up to the task but there are lingering doubts about some.

International troops will remain in Afghanistan until the end of 2014, providing military back-up when needed.

The ceremony came shortly after a suicide bomb attack in western Kabul killed three employees of the Afghanistan Independent Human Rights Commission and wounded more than 20.

Media playback is unsupported on your device Media caption President Hamid Karzai: "For the people of Afghanistan this is a great day"

The attacker was believed to be targeting the convoy of prominent politician and Hazara leader Haji Mohammad Mohaqiq, who escaped with light injuries.

Meanwhile, sources close to Taliban representatives have confirmed to the BBC that they are opening an office in the Qatari capital Doha, possibly as early as Tuesday. It is seen as an important stage in establishing a political face for the movement.

The Taliban has in the past refused talks with Mr Karzai's government, calling it a puppet of the US. But the Afghan president said on Tuesday he is sending representatives to Qatar to discuss peace talks with the movement.

President Karzai has been outspoken about his upset at previous US and Qatari efforts to kick-start the peace process without properly consulting his government, the BBC's Bilal Sarwary reports from Kabul.

There is also concern within the presidential palace that the Taliban will use the political office in Qatar to raise funds, our correspondent adds.

'Remarkable resolve'

Tuesday's ceremony saw the Nato-led International Security Assistance Force (Isaf) hand over control of the last 95 districts in a transition process that began in 2011.

The last remaining districts included 13 in Kandahar province - the birthplace of the Taliban - and 12 each in Nangarhar, Khost and Paktika, all bastions of insurgent activity along the border with Pakistan.

Analysis There are still 97,000 international troops in Afghanistan as part of the Nato-led mission but those numbers are reducing as the day for the end of combat operations comes closer. The forces are increasingly engaged in the complex business of closing bases and packing kit; very few now go out on patrol. The practical effect of today's event is not great - a handful of districts, mainly along the eastern frontier, and in Kandahar, move formally to full Afghan combat lead. But the symbolic impact is profound. For the first time since the departure of Soviet forces in 1989 and the years of civil war that followed, security across the whole of Afghanistan is now the responsibility of forces led by the Afghan government. Between now and the final exit of international combat troops at the end of next year, they will support combat operations only when requested. Alongside training the only other assistance is helicopters to take out casualties. The Afghan forces remain inconsistent, but those who train them say the best are as good as any army in a developing country. Afghan forces count cost of war Afghanistan profile - Timeline Deadly blast before handover

President Karzai called it an historic day and a moment of personal pride.

"This has been one of my greatest desires and pursuits," he said, "and I am glad that I, as an Afghan citizen and an Afghan president, have reached this objective today."

He reiterated a shift in military strategy, ruling out the future use of air strikes on what he called Afghan homes and villages; the issue of Nato air strikes and civilian casualties has long been a sensitive one.

Nato chief Anders Fogh Rasmussen said Afghan forces were taking up the role with "remarkable resolve" but said there was still 18 months of hard work ahead for Isaf troops.

"We will continue to help Afghan troops in operations if needed, but we will no longer plan, execute or lead those operations, and by the end of 2014 our combat mission will be completed," he said.

Some Afghans who spoke to the BBC said security had improved in their areas after foreign troops left.

"Now that the foreigners are gone, the security situation in the city and in the districts is much better," said one man from Kandahar.

Another man, from Surkhroad district in eastern Nangarhar province, was less sure.

"In the past when foreign forces were present in Surkhroad the security was fine," he said.

"Now that the security responsibilities are being handed over to the Afghan forces, the security situation is currently ok, but there are some insurgents who are still firing from the eastern mountain areas."

'Good enough'

The number of Afghan security forces has been gradually increasing from fewer than 40,000 six years ago to nearly 350,000 today.

However, as it has taken over more responsibility for security, the Afghan army has suffered a sharp rise in casualties.

By comparison, international coalition casualties have been steadily falling since 2010.

A high desertion rate among Afghan forces has also meant that thousands of new recruits are needed each month to fill its ranks.

Despite the challenges, Isaf commander General Joseph Dunford recently told the BBC that the Afghan force is "getting good enough" to fulfil its role.

In recent Taliban attacks on the capital Kabul, Afghan rapid reaction police tackled the insurgents without having to call in Isaf forces.

The number of Isaf forces in Afghanistan peaked in 2011 at about 140,000, which included about 101,000 US troops.

Isaf currently has about 97,000 troops in the country from 50 contributing nations, the bulk of whom - some 68,000 - are from the US.

Media playback is unsupported on your device Media caption Nato chief Anders Fogh Rasmussen said the transition had been "tough"

By the end of 2014 all combat troops should have left to be replaced - if approved by the Afghan government - by a smaller force that will only train and advise.

The pressure on contributing nations to withdraw their troops has been exacerbated by a series of "green-on-blue" attacks in which members of the Afghan security forces have killed coalition troops.

At least 60 Nato personnel died in such attacks in 2012. Many more Afghan security force members have died at the hands of their colleagues, in so-called "green-on-green" attacks.

US President Barack Obama has not yet said how many troops he will leave in Afghanistan along with other Nato forces at the end of 2014.

Washington has said that the Afghan government will get the weapons it needs to fight the insurgency including a fleet of MI-17 transport helicopters, cargo planes and ground support airplanes.

Afghan army chief Gen Sher Muhammad Karimi said air capability was a key challenge.

"We are limited in air transportation and in some places we still need Isaf to help us. Other than that we are fully capable of doing our job," he told BBC Pashto.