BAGHDAD – Iraq is a week away from a parliamentary election that was supposed to showcase a peaceful democracy poised to stand on its own feet after U.S. forces go home. While there have been successes, the vote also underlines the deep ethnic and sectarian tensions that are putting the country’s future in the balance — secular or Islamic, pro-Iran or pro-West.

Tension leading up to the March 7 balloting, only the second for a full four-year parliamentary term since the U.S.-led invasion in 2003, shows that despite more than 4,300 American and tens of thousands of Iraqi deaths, the ethnic and religious rivalries that fueled the war remain largely unresolved.

If the election produces a government that can bring relative stability, President Obama can declare success and comfortably withdraw all American forces by the end of next year.

However, if the election leads to greater instability, it will tarnish the legacies of both Obama and his predecessor George W. Bush, casting further doubt over the wisdom of a war that was launched on flawed intelligence that Saddam Hussein held weapons of mass destruction in violation of U.N. orders.

The country has seen progress since the dark days of the insurgency — explosions and the number of bodies at the morgue are fewer, and people move freely around the cities. Those are significant steps for a country where people were once terrified to leave their homes and fled the country by the hundreds of thousands.

But the election run-up suggests the core issues that drove violence — power-sharing among the rival minority Sunnis, majority Shiites, and the Kurds — remain unresolved and may be sharpening. That raises grave questions about what will happen when U.S. troops leave.

The U.S., which currently has just under 100,000 troops in the country, plans to withdraw all combat troops by the end of August and the remaining forces by 2012.

With more than 6,200 candidates competing, no one is expecting a straightforward outcome with the quick seating of a new government. It’s unlikely any single group will win an outright majority of seats in the 325-member parliament, which may mean weeks or months of political maneuvering to form a ruling coalition.

It’s been during these periods of instability that violence has spiked, so all eyes will be watching for a peaceful transition.

The choices are stark. Iraq’s 18.9 million registered voters will decide whether the country throws its support behind a religious, Shiite-led government with close ties to Iran.

Or does Iraq go with the coalition led by former Prime Minister Ayad Allawi, a secular Shiite.

Prime Minister Nouri al-Maliki’s State of Law Coalition lies somewhere in the middle.