Defense Secretary Leon Panetta let the cat out of the bag Wednesday on his way to a critical NATO meeting in Europe. The U.S. will remove its forces from combat in Afghanistan perhaps as early as mid-2013, a year and a half before schedule. At that point, U.S. and NATO troops would focus on advising, training, and providing intelligence and logistical support to Afghan forces. But the announced decision hides an even bigger one—a strategy to end America’s major military footprint in Afghanistan well before the previous December 2014 deadline. Don’t expect to see all the details, however, until after the November presidential election.

News stories and commentaries are dismissing the decision as political grandstanding to gain public applause. Actually, however, it involves some serious political risk. Inevitably, some senior military officers will share their doubts with the press and friends in Congress. They will all say, as they believe, that Obama’s new plan comes just as the tide of war is turning against the Taliban, and that the president is snatching defeat from the potential jaws of victory. These charges will be replayed in the media and given a megaphone by neoconservatives and Republican Party stalwarts. They will swear Obama is putting American security at risk.

The truth is that the president and his team are taking a risk. The risk is that early removal of U.S. and NATO troops from combat could lead to military gains in the field by the Taliban before November. But—and here are the political and strategic smarts—the Obama team is not actually removing the troops from Afghanistan before the U.S. election; they’re just removing them from the fighting. If worse comes to worst, and a calamity approaches, the White House can always send the considerable number of U.S. troops still in country into the breach.

With this strategy, the administration accomplishes three goals: (1) U.S. troops are removed from combat earlier, reducing lives lost and cost; (2) U.S. troops return home earlier; and (3) both security and political risks are made manageable.

Here are the background facts. U.S. forces came down from more than 100,000 to about 90,000 now. An additional 22,000 are due home by this fall. The remaining 68,000 were to be mostly, but not entirely, withdrawn by the end of 2014, at which time major combat operations by the U.S. and NATO would mostly cease and be replaced by a support and training role.

Press speculation immediately attributed the new U.S. and NATO decision to the machinations and complaints of President Sarkozy of France. He, it is being said, triggered this new White House decision when he announced that French troops would depart by the end of this year. He and France were infuriated by reports that French troops had been killed by Afghan soldiers whom they were training.

In fact, the White House had begun to shape this decision almost two months ago, with National Security Adviser Tom Donilon, Vice President Joe Biden, and Defense Secretary Panetta doing the pushing. Key administration officials said these senior leaders had become convinced that U.S. interests in Afghanistan were no longer vital, and that more American deaths and billions in costs were no longer worthwhile. But they hadn’t figured out the details or the politics until about two weeks ago. Specifically, they wouldn’t speed up withdrawals until after the U.S. election, but they would hasten the end of the American combat role. They still have additional big decisions to work out with generals on the ground: what use to make of U.S. airpower in support of Afghan forces and to forestall concentrations of Taliban troops; whether to continue special-forces attacks, etc. Also, and very importantly, they still need to figure out how fast to bring home the remaining 68,000 troops after the U.S. election.

Another surprise and sound part of this strategic package is that the U.S. and NATO will dial back on their goals and financial support for Afghan security forces. The plan had been to increase them to 350,000 from 310,000. In all likelihood, however, these troops will be cut back even from their present level of 310,000 in order to make them affordable to the Kabul government and less costly to the West.

Yes, the U.S. will continue to support the Afghan government in some form and to some dollar degree for some time. Much of the space vacated by the U.S. should be filled by Afghanistan’s neighbors. If they have any good sense about the threats they will face from Afghan refugees, drugs, and Islamic extremism, they will finally step up to their responsibilities.

But for the United States, the war is coming to an end. Its critical goals have been achieved. Osama bin Laden is dead. Al Qaeda there is virtually dead. There are no vital interests to justify further great sacrifices. And now it’s time to act upon this reality and bring the heroes home.