In spite of himself, George W. Bush has been forced to start extricating the U.S. from the Iraq war nightmare, a process President-elect Obama has promised to complete. A total U.S. withdrawal from Iraq can mark the first step in the Obama administration’s turn away from perpetual war and toward diplomacy and cooperation in U.S. foreign policy.

The Iraq-U.S. security agreements ratified by Iraq’s Parliament Nov. 27 feature a first-ever timetable for all combat forces to leave Iraq’s cities and villages by the end of June, and for all U.S. forces to leave Iraq by the end of 2011. The pullout can be speeded up by either side.

The Iraqi government now has a major say in how U.S. forces function in their remaining time in Iraq. A joint Iraqi-U.S. committee must approve U.S. military operations, use of bases and other facilities and detention of Iraqis by U.S. forces, and can even okay legal action against U.S. troops accused of grave offenses off duty and off base. U.S. troops can’t search Iraqi homes without Iraqi court warrants. The U.S. can’t use Iraqi territory as a springboard for attacks on other countries.

Some 170,000 civilian contractors are also losing their legal immunity.

While the pact has loopholes and omissions, Iraqi political forces across the board see it as the best path now to end the occupation.

For the new Obama administration to move to broaden the pact’s provisions so that troops, contractors and bases are all removed as quickly as possible and steps are taken to improve the Iraqi people’s living conditions, would be welcomed with open arms by most Americans and all Iraqis.

The next step, of course, is to reverse course in Afghanistan, ending the war, withdrawing troops and working with the United Nations to help that country overcome the devastation wrought by three decades of conflict.

Such actions would be a great start on the road to reversing the Bush administration’s disastrous drive toward perpetual wars and turning toward a new foreign policy based on diplomacy, cooperation and sharing resources to benefit all humanity.