Afghan President Hamid Karzai says Kabul is now an international city
The North Atlantic Treaty Organisation (Nato) has assumed control of peacekeeping in Afghanistan - the alliance's first ever operational commitment outside Europe.
Afghan President Hamid Karzai and Nato's Deputy Secretary General Alessandro Minuto Rizzo attended the simple ceremony in the capital, Kabul.
Mr Karzai said Kabul had now become an international city open to business and investment because of the work of International Security Assistance Force (Isaf).
The Afghan Government has continually asked for Isaf's mandate to extend beyond Kabul - where violence has continued unchecked.
But Mr Rizzo said Isaf's name and mission would not change.
"But what will change as of today is the level of commitment and capability Nato provides," he said.
The United Nations has suspended road travel in parts of southern Afghanistan following a spate of attacks on Afghan aid workers and policemen by unidentified assailants.
A resurgent Taleban movement has been attacking government targets and those connected with foreign aid organisations in the south-east of the country in recent months.
Outside Kabul there are frequent battles
German Defence Minister Peter Struck has said he plans to send more officials to northern Afghanistan to examine the possibility of deploying German troops to the city of Kunduz, close to the Tajik border.
Correspondents say an operation in the north - where Kunduz was previously a stronghold of the Taleban movement - is riskier than deployments in Kabul itself.
Outgoing Isaf commander Lieutenant General Norbert van Heyst, handed over Isaf's green flag of command to fellow German Lieutenant General Gotz Gliemeroth, at the ceremony at the recently refurbished Amani High School.
The school auditorium was ringed by armed peacekeepers and armoured cars mounted with machine guns. Bomb-sniffing dogs were on hand to search for any explosives, the Associated Press news agency reported.
"Afghanistan must not lapse back into anarchy and chaos and must not again become the home of global terror, as was the case under the rule of the Taleban," Mr Struck told the gathered dignitaries.
"What the people of Afghanistan wish for is a stable peace. They are pinning great hopes on the international community. The support of Nato for Isaf... is a visible expression of the fact that the people of Afghanistan will not be let down.
The BBC's Adam Mynott in Kabul says the transfer also marks a
significant moment in the history of Nato - a recognition that the biggest danger now to its members is international terrorism.
It is a departure from Nato's traditionally defensive strategy, our correspondent adds - the alliance is now prepared to be proactive, in tackling any perceived threat.
Nato took the command of Isaf from Germany and the Netherlands, who have led the force jointly since February.
It will remain in charge indefinitely, removing the need to find a new lead nation every six months.
Afghans have taken their message to the street
Nato says this will provide greater continuity in the leadership of Isaf, enabling the force to take a longer term view of Kabul's security problems.
Isaf has some 5,000 soldiers from 31 countries, but most of these troops already come from Nato member states.
Under its United Nations mandate, the security force is responsible only for the capital and its surrounding area.