Speaking at a military academy outside Kabul, President Hamid Karzai said the police and army were ready to take on insurgents, but a bomb in the city underlined persistent instability.
Three civilians were killed in the attack, which targeted a prominent lawmaker as his convoy travelled to parliament just before the handover ceremony began.
"Our security and defence forces will now be in the lead," Karzai told Afghan and NATO officials at the event, the timing and location of which had been kept secret due to fears of a militant attack.
Doubts remain over the ability of Afghan forces to thwart the Taliban, and the NATO military coalition will retain an important function in logistics and air support as well as in combat emergencies.
Also Read
But NATO chief Anders Fogh Rasmussen said that by taking the lead in security today, Afghan forces were completing a five-stage transition process that began in March 2011.
"They are doing so with remarkable resolve," he said.
"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."
The handover of the last 95 districts from NATO to Afghan control includes areas in the south and east where the Taliban have concentrated their bloody insurgency since 2001.
As Afghan soldiers and police take over the fight against the militants, who were ousted from power after the 9/11 attacks, the 100,000 NATO troops will focus on training and mentoring roles.