All French combat troops will pull out of Afghanistan by the end of the year, France's new president said in Kabul Friday, but some trainers will remain to help Afghanistan's nascent security forces.

Francois Hollande said that France's troops have carried out their mission in Afghanistan and it is time for them to leave, an early pullout that will be coordinated with the United States and other allies.

"There will be no combat troops" after the end of the year, Hollande said during a joint news conference with Afghan President Hamid Karzai.

Hollande flew to Afghanistan to meet with troops and to discuss plans with Karzai to withdraw French combat troops more than a year earlier than scheduled. His visit was not announced ahead of time for security reasons, and he was expected to depart shortly after the news conference.

Hollande said that France will withdraw its 2,000 combat troops, out of a total of 3,400 troops and 150 gendarmes, by the end of the year. Some would stay behind to help send military equipment back to France, and others would help train the Afghan army and police. He did not provide a breakdown for the roles of the 1,400 soldiers who will remain past 2012 or how long they would stay.

Hollande said that continued cooperation was discussed over lunch with Karzai "because there will continue to be trainers who will work with (Afghan) soldiers and police."

"We won't have any more combat forces in Afghanistan after Dec. 31, 2012. I say specifically combat forces. We will still have a military force that will be dedicated to the training of Afghan army officers, that will also be present at the hospital, the airport and also will allow the Afghans to have a police force that is the most effective possible," he explained during a function at the French Embassy.

Hollande insisted France is not abandoning Afghanistan. "No. This is a continuation, and there will be further engagement, but in a different form."

He warned of possible problems in the pullout. "We will have to take every precaution. We must limit as much as possible our losses, make sure that there is no risk for our soldiers," he said.

French military spokesman Col. Thierry Burkhard said the number of trainers who stay will be "in the hundreds" and that those conducting the logistics for the pullout will leave bit by bit along with the withdrawing troops.

There are French troops in Kabul, eastern Kapisa province, the Surobi district of and at the Kandahar air base in the south -- where France has three fighter jets. Burkhard said most of the 2,000 who leave will be those in Kapisa and Surobi.

Hollande said French equipment would be taken out by ground routes, but did not say which ones.

Pakistan closed overland supply routes to Afghanistan for NATO after a U.S. attack on the Pakistani side of the border killed 24 Pakistani soldiers last November. The decision has forced NATO to use a more costly route running through the north.

France has signed an agreement with Afghanistan that calls for cooperation after 2014. Other countries, including the United States, have signed similar accords.

"We want France to have a presence in Afghanistan differently from how it did in the past," Hollande said. France wants to be "useful in a different way," in economic and cultural matters, he said.

During an earlier meeting with French troops at a base in Kapisa's Nijrab district, Hollande said "several reasons justify this decision to withdraw our combat troops from Afghanistan."

"The time for Afghan sovereignty has come," he said. "The terrorist threat that targeted our territory, while it hasn't totally disappeared, is in part lessened."

Another reason "is that, simply, you have carried out your mission."

Hollande announced plans at a NATO summit this week to pull out French troops by the end of the year, well ahead of the alliance's 2014 withdrawal date.

Reflecting increasing French disillusionment with the war, Hollande's conservative predecessor, Nicolas Sarkozy, had pledged to withdraw all troops by the end of 2013. Hollande, elected president this month, made a more immediate pullout a pillar of his campaign.

Tension over Hollande's pledge to end his country's combat mission two years early dominated the NATO summit in Chicago, unleashing fears of a domino effect of other allies withdrawing early. France is the fourth largest troops contributor after the United States, Britain and Germany.

President Barack Obama last year decided to pull out 33,000 U.S. combat troops by September.

Gen. John Allen, the top U.S. and NATO commander in Afghanistan, said this week that on Sept. 30 there will be 68,000 U.S. and about 40,000 other coalition forces in Afghanistan -- compared to more than 130,000 last year.

The coalition has started handing over security control to Afghan army and police in areas home to 75 percent of the population, with a goal of putting them in the lead for all the country by mid-2013. NATO and other foreign forces would then be in a support role for the 352,000-strong Afghan National Security Forces.

Most foreign combat troops will have left Afghanistan by the end of 2014, when Afghanistan will take complete control for security around the country.

Kapisa, where French forces are based, is one of the areas now being transferred to Afghan control. Ashraf Ghani, head of a commission overseeing the transition, said earlier this month that "the risks in Kapisa are containable and within our capability."

"Between now and the end of the year, the Afghan army will take control of the zones protected by our forces," Hollande said. The transition will be carried out "intelligently and with complete and friendly cooperation with the Afghan authorities"