KABUL, Afghanistan — President François Hollande of France made a visit to French troops in Kapisa Province on Friday, assuring them that their mission in Afghanistan would be over this year.

The visit came less than a week after the new French president announced at a NATO summit meeting that France would pull its troops out of Afghanistan by the end of this year, two years ahead of the 2014 deadline previously agreed to by NATO and the United States for withdrawal.

At a news conference here with the Afghan president, Hamid Karzai, Mr. Hollande said that while French combat forces would leave this year, French advisers and trainers would remain in Afghanistan to help the Afghan defense and interior ministries. In addition, he said, French nonmilitary aid will be increased, although he did not give any specifics.

Mr. Karzai did not refer to the French troop withdrawal during the brief news conference, which was cut short by rain before anyone asked about his views on the subject.