The Soviets and Afghans alike would have been far better off if the USSR had withdrawn earlier.
As we struggle to extricate ourselves from Iraq, it's useful to look at how the Soviet Union handled a similar position in the 1980s. Then we should do the opposite.
The Soviets invaded Afghanistan in 1979 based partly on an intelligence failure analogous to our own in Iraq: They believed that their poorly behaved puppet in Kabul was poised to switch loyalties to the United States.
And that's a lesson we should absorb in Iraq.
Digital Access for only $0.99
For the most comprehensive local coverage, subscribe today.
Gen. David Petraeus is doing an excellent job, but the surge isn't about making streets safe. Rather, its aim is to create political space for reconciliation - and in that respect the surge has failed.
Even in the Bush administration, everybody seems to recognize that Prime Minister Nouri Kamal al-Maliki is incapable of achieving a reconciliation. In the absence of realistic hope for reconciliation, let's not drag things along as the Soviets did in the 1980s but bite the bullet as Mikhail Gorbachev did in 1987 and announce that we are headed for the exits.
There's a lot of talk about partitioning Iraq to reduce the violence, and it's happening already - and that de facto partition is a crucial step to reduce the risk of genocide once we leave. But for the United States to embrace partition would be disastrous: We would be portrayed in madrassas around the world as the infidels who dismembered an Arab country to seize its oil and emasculate it on behalf of Israel.
An essential step is to work more closely with Iraq's neighbors, including those we don't like, such as Iran and Syria. These countries have as much interest in a stable Iraq as we do, and the moment Iran shoulders some responsibility for southern Iraq it will also risk instability in its despotic regime at home.
At the end of the day, we have only so much money and so much energy. One option is to continue to devote $10 billion a month and countless lives to Iraq in hopes that our luck will somehow turn. Or we could devote those sums to health care at home and humanitarian programs all around the world - because in the long run, the best hope to defeat the jihadis worldwide isn't to drop bombs but to build schools.
Nicholas D. Kristof, a columnist for the New York Times, can be reached at New York Times, editorial department, 229 W. 43rd St., New York, NY 10036.