PARIS  As the United States prepares to commit 17,000 more troops to Afghanistan, the commander of NATO and American forces there said on Monday that the coalition was “not winning” the war against the resurgent Taliban in parts of the country.

Gen. David D. McKiernan’s assessment echoed that of President Obama who said in an interview that the United States was not winning the Afghan war and who raised the possibility of the American military reaching out to moderate elements of the Taliban, much as it did with Sunni militias in Iraq.

In an interview published in the French newspaper Le Figaro on Monday, the French foreign minister, Bernard Kouchner, took the idea further, saying the West should accept a pro-Taliban leadership if Afghans choose such an administration in elections set for next August.

“In Afghanistan, there will not be an exclusively military solution,” he said, adding: “We should accept the result of the forthcoming elections whatever it is.”