Four years ago, Iraq's oil minister Hussain al-Shahristani confronted a stark choice: should he risk opening Iraq's ailing oil industry to foreign companies?
Iraq's oil sector was limping along after years of sanctions and conflict following the U.S. invasion in 2003, and badly needed more investment. But bringing in Big Oil could expose a vulnerable country to rapacious bids and exploitation.
Ignoring sceptics, public criticism and threats from his political opponents, Shahristani made his choice and negotiated oil contracts that he believed would eventually allow Iraq to reconstruct its economy and begin to rival fellow OPEC member Saudi Arabia.
I was convinced the world would need Iraqi oil...So, I took my decision to offer service contracts despite all the problems and threats from inside and outside Iraq, says Shahristani, who has since become deputy prime minister for energy.
Now, nearly nine years after the invasion that toppled Saddam Hussein and with U.S. military forces close to completing a withdrawal from the country, Shahristani's hopes have been only partially realised.
Major foreign oil companies are helping Iraq develop the world's fourth biggest reserves, slowly ramping up its output, but the country faces severe obstacles and a frail economy needs investment in almost every sector.
The country is still plagued by shaky security, decades-old laws, a Saddam-era centralised bureaucracy, crumbling infrastructure and a sectarian social and political divide. Although violence is down from the bloody heights of 2006-2007, almost daily bombings, attacks and assassinations remain a major deterrent to investment.
The country has also been forced to curb some of its oil ambitions. Iraqi officials have begun to talk about 8 million barrels per day as their implied long-term target for output, down from the 12 million bpd they previously pledged.
International oil companies working in Iraq grapple with many challenges, from security to logistical bottlenecks and bureaucracy.
Iraq's financial system is slowly embracing the free market after years of tight control under Saddam; a fledging stock market is attracting foreign money while the banking and telecommunications industries are growing rapidly.
But the national grid provides only a few hours of intermittent power a day, forcing Iraqis to live off noisy diesel-fuelled generators.
Do we consider it fast economic development? No, it is a very slow development, but it is developing, said Fadhil Nabi, deputy minister of finance.
Shahristani has been criticised in parliament for not having raised Iraq's oil output faster. Although his deals with foreign companies could theoretically see Iraq quadruple its output capacity to 12 million bpd by 2017, many analysts say 6 or 7 million bpd is more realistic.
Even reaching 6 million bpd, however, would give Iraq much more weight in OPEC, currently dominated by the world's top oil exporter Saudi Arabia. Revenue from the additional millions of barrels that Iraq is hoping to pump would also give it the economic strength to rebuild; oil revenues account for more than 95 percent of state income.
So far, deals with over a dozen foreign oil companies have taken national production to 2.95 million bpd, the highest level in two decades.
The entrance of major oil firms into Iraq has encouraged other foreign investors who had been sitting on the sidelines. Household names such as General Electric Co, Siemens, France Telecom and HSBC are operating in the country, foreseeing that with its oil wealth and population of 30 million, Iraq could become an attractive retail market and industrial power.
The government has ambitious plans to ramp up electricity generation, build hundreds of thousands of new homes, expand ports, renovate roads, build railroads and introduce high-speed trains.
After economic growth of just 4.2 percent in 2009 and 0.8 percent last year, the International Monetary Fund projects expansion of 9.6 percent this year and that growth will be around 9 percent or higher every year through 2016.
But Iraq still struggles with issues that could prevent such growth rates. Political infighting in the government is contributing to delays in many infrastructure projects, while there are legal uncertainties over some of its choicest oil assets in the semi-autonomous Kurdish region. The Kurdistan Regional Government is locked in a feud with the Arab-dominated central government in Baghdad over territory and oil rights.
When U.S. oil giant Exxon Mobil signed with the KRG in mid-October for six exploration blocks, the Iraqi oil ministry said the deal was illegal and could result in termination of Exxon's contract to develop the major West Qurna Phase One oilfield in the south.
And despite a modest rise in foreign investment over the past few years in sectors such as telecommunications and electricity, Iraq remains a state-centric economy; beyond oil, private businesses have yet to play a large role in rebuilding.
Twenty-three percent of the population lives below the poverty line, according to the Ministry of Planning. The official unemployment rate is 15 percent but a further 28 percent of the workforce is estimated to be in part-time jobs.
Popular anger over power outages, food ration shortages, corruption and government ineffectiveness has sent thousands of Iraqis onto the streets to protests during the past summer. But people still dream of enjoying the untapped wealth of their country.
I know Iraq still has a long way ahead, but I believe one day our children will live in luxury like the people in the Gulf, said Mahmoud al-Obeidi, a Baghdad university professor. My hope is as big as Iraq's oil reserves.
(Additional reporting by Serena Chaudhry; Editing by Patrick Markey and Andrew Torchia)