Iraq will serve as an early test of Barack Obama's skill in weighing options and measuring risks. The next few months should give an indication whether he can end the war in Iraq without risking new violence that could threaten U.S. interests throughout the Middle East.
Ending the war, which the Congressional Budget Office says costs $145 billion a year, would fulfill an important campaign promise and free up military resources for the fight against al-Qaida and the Taliban in Afghanistan.
But can Iraq stand on its own without the U.S. presence?
After so many sacrifices, can the U.S. afford to watch the country – strategically located next to Iran, Syria and Saudi Arabia and with one of the world's major sources of oil – collapse into chaos?
The first signs of where Iraq is headed should come soon after the new president takes office in January when Iraqis choose ruling councils in most of the country's 18 provinces.
At the same time, the Iraqis will be assuming more control of Baghdad and integrating former Sunni insurgents into the security forces or civilian government jobs.
If those steps go smoothly, Iraqis will have a chance of maintaining the security gains since last year's U.S. troop buildup. If they don't, Obama would have to decide whether to slow the U.S. departure despite his promise to remove combat troops within his first 16 months in office.
Provincial elections have been widely seen as a major step in forging power-sharing agreements among Iraq's religious and ethnic communities that the U.S. believes are key to lasting peace.
The Bush administration has been pressing the Iraqis to hold those elections to empower the Sunnis, who launched the insurgency in 2003. Many Sunnis have stopped fighting and forged ties with the U.S.
But Sunnis largely boycotted the last provincial ballot in January 2005, giving a greater share of power to Shiites and Kurds, even in areas with substantial Sunni populations.
There's real fear that the election, expected at the end of January, could heighten tensions among Sunnis, Shiites and Kurds – especially in the ethnically mixed north. Trouble is also possible in the heavily Shiite south, where the competition is between Prime Minister Nouri al-Maliki's party and the Supreme Islamic Iraqi Council, the two main Shiite parties in the national government.
The U.S. plans to hand over security in Baghdad to the Iraqis and move all U.S. soldiers out of the city by June 30 under a proposed security agreement that has yet to be ratified. U.S. troops are already handing over more and more responsibility in the capital to the Iraqis.
Their performance has been mixed. Although violence is down sharply, a string of attacks in the city this week has killed more than 30 people since Monday. That shows that extremists are still active within Baghdad and could step up operations once the Americans are gone.