Tom Ricks, in Sunday’s Washington Post, makes a really — really really — bold prediction.

This week’s confrontation between a senior Army general and the president of the United States may have signaled the beginning of the end of the war in Afghanistan. In a year or two, President Obama will be able to say that he gave the conflict his best shot, reshaping the strategy and even putting in charge his top guy, the general who led the surge in Iraq — but that things still didn’t work out.

Then he can begin pulling out.

I’m not sure I agree with the reasoning Tom uses to get there, which have more to do with the personalities in Afghanistan Petraeus must now work alongside — well, maybe he can work with the dudes? — and less with the circumstances of Afghanistan war, which get short shrift in his argument. But the prediction he provides has a compelling logic to it. For the purposes of this post I am going to adopt an presumption that — to be very clear — I believe has been relentlessly overstated by the media and the blogosphere: that Obama and the military, symbolized by Petraeus, are frenemies, out to shank each other if their interests demand it. (In reality, there’s a kernel of truth to this that people think is a cornfield. But that’s all it is — a kernel.)

In this telling, Petraeus is Obama’s political insurance policy. Absolutely no one on the right will criticize the war while Petraeus is running it. The right’s only line of criticism on the war is that July 2011 is an ill-conceived deadline. But Petraeus backs the July 2011 “inflection point” on the condition that troop withdrawals after the date occur very slowly, and by picking Petraeus, Obama signaled his assent to that interpretation of his date. Still, Petraeus will testify on Tuesday, as he did last week, that he supports the date. Political Problem #1: solved.

Then there’s Political Problem #2: actual extrication, sometime verrrrry slowly in 2012 or 2013 maybe. And I wouldn’t be surprised if “extrication” involves some kind of residual force, Balkans-style, to enforce a kind of containment on a rump safe haven for al-Qaeda across the border in northern Waziristan; to serve as a launching pad for harassing that safe haven from the air; and to serve as an insurance policy in case something goes wrong. Who knows: maybe that won’t be the case and the contours of a political settlement to the war involve a phased withdrawal to zero U.S. troops like the SOFA in Iraq. But here Tom’s logic is compelling. Getting Petraeus to serve as the architect of a policy that culminates in extrication creates a national consensus around extrication. You know how Obama allowed Gen. Odierno to basically forestall withdrawal from Iraq in 2009? Now there is absolutely no controversy around leaving Iraq, which is a massive and under-appreciated political achievement. After all, consensuses can unravel when demagogy is politically useful, as the inability to close Guantanamo shows.

Finally there’s Political Problem #3: Petraeus himself. Ezra Klein puts this very succinctly in a kind of offhand observation: “David Petraeus [is] taking a command that amounts to a demotion from his current post and could destroy his reputation as a miracle worker.” If the Afghanistan war proves terminally doomed, that won’t destroy Petraeus’s Washington reputation. It’ll just bruise it. But bruising it will be enough to neutralize any political threat that Petraeus might pose to Obama. At this point, the two men have absolutely no choice but to be partners because their interests — and the country’s interests — demand it. Frankly, it’s the most productive kind of reconciliation there could be, even if the need for reconciliation between them has been overstated in the media. And if Petraeus succeeds, Obama succeeds, and they’re both miracle workers.

There’s been a lot of talk, particularly in the lead-up to the West Point speech and then again earlier this week during McChrystal’s self-immolation, about how the military “manipulated” Obama into escalating in Afghanistan. I’ve written in this space a million times how and why that’s overwrought. But if it’s true, then it’s equally true that moving Petraeus to Afghanistan shows Obama boxing the military in. Or, as Rorshach put it: None of you seem to understand. I’m not locked in here with you. You’re locked in here with me!