In a surprise five-hour trip, Sarkozy met Afghan President Hamid Karzai, had a working lunch with General David Petraeus, the top US commander in the country, and visited French troops in the region of Surobi, east of Kabul.
Sarkozy, who followed US President Barack Obama's June announcement of faster troop withdrawal, said France's remaining soldiers would be based in Kapisa province and that all combat units would be brought home by the end of 2014. After that, some soldiers would remain in Afghanistan to train Afghan forces.
"You have to know how to end a war," Sarkozy said.
Sarkozy's third trip to Afghanistan since he came to power in 2007 coincided with the killing of Karzai's influential brother, Ahmad Wali Karzai, who was apparently shot by one of his bodyguards.
France has 4,000 troops in Afghanistan and has seen 64 of its soldiers killed since it joined the US - and NATO-led Afghanistan operation in 2001. The latest casualty was killed on Monday by an accidental shot from his own camp in Kapisa.
The quicker pullout could give Sarkozy a boost ahead of the April 2012 presidential election, where he faces a tough battle from the left-wing opposition to win a second term.
An opinion poll after the death of former al Qaeda leader Osama Bin Laden in May showed more than half of French people support a withdrawal from the nearly decade-old military campaign against Taliban insurgents.
French Foreign Minister Alain Juppe said France's withdrawal would be limited to the Surobi region, east of Kabul.
"We believe this region is now secure and the time has come to pass the baton to the Afghan troops," he told France Info radio.
Sarkozy's visit followed a trip by US Defense Secretary Leon Panetta at the weekend and came two days before France's "Bastille Day" national day, which marks the start of the 1789 revolution and will this year honour troops on foreign missions.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ