There’s been a lot of criticism of Obama’s Afghanistan drawdown plan, from those who say it’s not enough to those who complain he’s bringing too many soldiers back too fast.

I think this means that he got it just right.

For weeks he has been dogged by a comment from an aide, reported in The New Yorker, that he was “leading from behind.” With the administration’s slow response to the Arab Spring, and by stepping back from a lead role in the Libya bombings, it looked like caution was the hallmark of the Obama “doctrine.”

But on Wednesday night, Obama demonstrated a boldness that has been lacking in his foreign policy choices. He revisited the goals of the Afghan military campaign in his 2009 speech at West Point, when he first announced the “surge,” and reminded us that above all he is a pragmatist: “We must be as pragmatic as we are passionate; as strategic as we are resolute.”

So saying, he put the military in its place by deciding on a swifter withdrawal of the 30,000 “surge” troops than his generals had recommended. Gen. David Petraeus was overruled. But the Afghanistan commander will still have 70,000 American troops in place once the additional soldiers dispatched last year have returned home.

There cannot be a military solution to the Afghan conflict. The French, Germans and British are expected to speed up the withdrawal of their own troops from Afghanistan in light of the Obama announcement. As for the dire warnings about the risks of an accelerated drawdown, the Taliban can outwait the U.S. troops’ departure whether they leave now or in 2014.

Obama must know that ultimately, a lasting solution can only be found in the corridors of diplomacy. In December in Bonn, Afghanistan’s neighbors will gather 10 years after anointing Hamid Karzai as the head of the interim government, to discuss the way forward. Afghanistan’s stability depends on their good will.

But also, let’s not forget that the commander in chief is running for reelection. I believe that through his compromise troop withdrawal he stands a better chance of winning a second term. Nation-building does indeed begin at home.