In a palm grove village near Fallujah, a crude shell of a building stands empty. It is a school unfinished. Poorly mixed concrete has chipped away from the ceiling and crumbled along some support beams. The American military paid for the project but stopped it because of substandard work by an Iraqi contractor. Now the United States is looking for a new builder.

But wrapped up in these barren brick walls are the dreams of an Iraqi headmaster for his students, who are now crammed, four shifts a day, into another school. Until recently, any public embrace of the American presence in this part of western Iraq, including association with hundreds of US-funded rebuilding projects, brought the risk of being killed.

So when a colonel from the US Army Corps of Engineers (USACE) rolled up for an inspection at the half-built school, 30 miles west of Baghdad, it was no small thing for the would-be headmaster to approach him. "I'm really concerned about this project," said Bassim, reaching out his hand atop a debris-cluttered stairwell. "When you arrived, I was so happy to see you."

He had heard rumors that the project was being handed to the Iraqi government. He had visited another 12-classroom school the Americans completed in Fallujah and wanted the same high-quality construction. Col. Jon Christensen took off his sunglasses and one combat glove, shook the headmaster's hand, and said: "We are of the same mind – we are committed to getting this done. We'll come and have tea when it's done."

After seven years of war, the story of these two schoolhouses in Fallujah is emblematic of the partial triumphs, severe challenges, and massive American effort across Iraq.

The US has already poured $736 billion into the country, where a mission to rout out weapons of mass destruction (WMD) that didn't materialize turned into the largest nation-building effort since World War II, with $53 billion allocated by Congress to underwrite everything from education and sewer systems to office furniture and paint.

As US combat forces prepare to cut back from a high of 170,000 troops to just 50,000 by Sept. 1 – with full withdrawal slated for the end of 2011 – Americans, Iraqis, and the international community are assessing the impact of one of the longest and most expensive wars in US history.

To detractors, the war has been a colossal failure, sapping the US Treasury, killing countless Iraqis and Americans, and turning millions of residents across the Middle East against the US – all in a phantom search for WMD that left Iraq unstable and Iran transcendent in the region. To supporters, the war deposed a tyrant, established the foundation for a nascent democracy in the Middle East, and, with the help of the modern equivalent of a Marshall Plan, will help establish a stable and strategically important ally in the volatile region.

Iraq today is no longer as apocalyptic as it appeared during the peak of the insurgency and sectarian civil war in 2006 and 2007 when 3,000 people were being killed each month. And it is a different place from pre-2003, when Saddam Hussein ruled with an iron hand over a population utterly afraid to criticize its dictator.

But wars of this magnitude never leave countries fully where expected, and in Iraq the variables of violence and popular disillusionment have been felt most tragically by those who live in the battle theater – Iraqis themselves.

"Given the blood and treasure expended on all sides, it's a pretty poor outcome," says Toby Dodge, an Iraq specialist at the International Institute for Strategic Studies in London. "We've got a prime minister with distinct dictatorial tendencies, an army that's coming to the same size [as Saddam Hussein's], multiple intelligence services ... the Iraqi state has been reconstituted to look very similar to the one under Saddam, without the more egregious aspects," says Mr. Dodge, noting that levels of corruption also far exceed those before the war. "If you were a poor Iraqi who has gone through 13 years of sanctions, a major invasion, a civil war ... it's not a very rosy picture."

There have, in fact, been many failures, among the most prominent the inability to keep Baghdad's lights and refrigerators humming for more than a few hours a day. Iraqis frequently express anger over poor infrastructure despite all the money spent. Their fears are confirmed by official news of episodes of poor auditing – such as a July report by the US Special Inspector General for Iraq Reconstruction (SIGIR), which found that the Pentagon could not account for its use early on of $8.7 billion of Iraqi cash, which "left the funds vulnerable to inappropriate uses and undetected loss."

Americans and Iraqis engaged in reconstruction say many lessons have also been learned and security has improved. The current monthly death toll of 300 is 1/10th that of 2007. But the cost has been high, with more than 4,400 Americans killed and almost 32,000 wounded. Tens of thousands of Iraqis – some estimate hundreds of thousands – have also died from violent death and the broader impact of conflict.

In the minds of Iraqi citizens – many bitter over lives lost and seared with indignation over atrocities such as the abuses at Abu Ghraib prison, but also ignorant about the extent of American investment in reconstruction – the US presence here has left a mixed legacy. It ranges from hostility to gratitude. "The locals are happy, but they won't say, 'We are grateful to the US' because of security concerns," says one Iraqi engineer from Baghdad who has worked with the US military in Fallujah since 2005. "People could write on their door 'Traitor' or kidnap them. It is a shame. They should be grateful for what [the US] did for the city."

* * *

Anti-American hostility lingers in Fallujah like few other cities because more than 300,000 residents were ordered to leave in advance of the 2004 assault. The military broke into and searched every one of the estimated 30,000 structures. Some were destroyed in the fight to kill militants.

When it was over, Fallujah was sealed off and a biometric security system put in place for all returning residents. Compensation was paid for damage, but Fallujans were shocked at what they saw.

Since then, the Iraqi government has paid for two new bridges; a new 200-bed, $46 million hospital; and a host of other projects like roadworks. But the US military has also channeled much money into the area. Among the 4,600 projects USACE has implemented across Iraq, 109 projects worth $190 million lie in Fallujah alone.

The Army's project map for the city shows that 99 are complete, ranging from a $104 million sewer system and electricity transformers to new health centers, police posts, and the Al-Shuhada school – the object of headmaster Bassim's envy. Brick red, it stands out among the dun-colored houses and rubble. Painted on the wall inside are the words: "You work hard, you will achieve your dream."

During a visit, Christensen, the USACE colonel, asked the guard if he was happy with the building. "I was thanking God, because the kids of all the families will get an education," replied Ali Ahmed.

But that reaction is hardly uniform for US-funded projects, which rarely advertise their American connection. Abdul Hamid al-Jeraisi, a law graduate, had no idea the road in front of his sweet shop was paved with American cash. "Do you mean this street?" asked Mr. Jeraisi, surprised but unimpressed. "No, 100 percent no, this will not change the way I look at the American military," which, he says, "gave out their contracts to thieves who have no conscience" and who made "enormous profits."

Indeed, public association with the US remains "taboo," says one Fallujah resident, after watching a report on Al Anbar Television about two key lines of the sewer system in Fallujah.

Citizens on the street are quoted praising the engineers, workers, the city council, and the contractor. But during the nearly seven-minute program, not one word is said about the US underwriting the entire project.

Still, some Iraqis say that no amount of US money can compensate for human losses. "The people of the city will not accept that the Americans trade civilian lives for services," says Hassan al-Mihamdi, a department head at a teachers' institute. "The wounds of the country cannot be healed before half a century."

Never mind that the city council and local sheikhs in Fallujah – as in cities across Iraq – have worked closely with US military units, funneling money for reconstruction to Iraqi contractors. "These tribal sheikhs will not defend the US [to their tribe]," says the unnamed Fallujah resident. "When someone says, 'They killed my wife in that bombing,' what will he tell them, that the Americans put $10 million into the city?"

Facing such Iraqi perceptions, some US military officers take the long view. "The [Fallujah] offensive was only six years ago, so it's still fresh in their minds," says USACE Maj. James Roche. "It takes time."

* * *

Like the military, the U.S. State Department has also learned to mask a "Made in the USA" label. The department's provincial reconstruction teams (PRTs) are working closely with local government and ministries to fulfill needs from training midwives to boosting crop yields for farmers.

In Anbar, projects include a $270,000 effort to tutor 56 public health workers in a country from which an estimated 8,000 doctors had fled between 2003 and 2008. Farmers share the cost of US-supplied "hoop houses" that use drip irrigation to make local produce. Twenty women taught how to care for dairy cows have trained a further 500 women.

"I talk with people every day, sheikhs and others," says an Iraqi translator who works for the Anbar PRT. "[Those we work with] thank us for a lot of things, and say 'without the US we are lost'.... But the people you meet on the street – they don't like us."

A top priority for PRTs in Anbar has been coping with the dropping water levels of the Euphrates River, now down to one-third of its prewar flow rate because of upstream damming in Turkey and Syria. The PRT has financed pipe extensions to deeper water, and circulated seed varieties that do better in saltier soil. Still, huge problems remain, such as the lack of electricity to run new pumping stations.

Other American efforts bring more immediate results. This summer, the US Agency for International Development (USAID) funded a two-month camp for 600 youths in Fallujah and, along with the Ministry of Education, accelerated courses for 1,900 schoolgirls. Families had pulled many of the girls out of classrooms to do chores. "There seems a much more willing acceptance of our programs," says a USAID official on the PRT.

"A lot of people are well aware of what we are doing," says another PRT member, one of several American advisers of the Anbar team in Ramadi (70 miles west of Baghdad). "The real problem is getting that message across to a broader audience."

But prejudices remain ingrained from years of conflict. Literacy classes for adult women – part of a national campaign – have proved popular, with 1,400 in the latest class in Fallujah.

"I can read and write now, so I can find a job," said Karima Ahmed Thahi, a 40-something widow with six children in Fallujah, who said the city had "changed for the better" with reconstruction.

"I am determined to participate, and also next year, because they promised to develop our capabilities more and more."

When asked if she knew that her course was financed by USAID, however, she grew angry and inaccurately mixed up money from USAID – dispensed under the auspices of the State Department – with cash from the US military.

"If this [US funding] turns out to be true, then they laughed at us and this is a fraud," said the widow. "They killed our sons and destroyed our city, and now fool us with these things."

* * *

Ghazi Abdulaziz may have the most thankless job in Iraq. He is the director of the Doura power station, a sprawling four-smokestack facility that provides a quarter of the capital's electricity, and few issues resonate in Iraq like the lack of power.

Work at the plant has always been dangerous. In 2003, insurgents were already launching daily attacks against Iraqi electrical engineers and facilities. Seven years later, the killing hasn't stopped: In late July, a top ministry official was targeted by a bomb planted beneath his car.

Mr. Abdulaziz once had to replace glass in his office that was shattered by bullets; gunmen often fired into the power units. He even organized a boat to carry staff to safer neighborhoods across the Tigris River when this district in southeast Baghdad became one of the most dangerous during sectarian fighting.

But these days, providing power to citizens is more frustrating than dangerous – partly because the original US-funded renovation was plagued by challenges. "There were so many problems. We couldn't reach our maximum load," says Abdulaziz, an engineer who had stepped away from working on a power unit for an interview. Beside his desk an Apollo-era LED display blinks with the output of each power unit. "Even now, we are suffering."

By mid-2007, eight of 12 main transmission lines were down, severely reducing electricity supplies to Baghdad, according to one congressional report. A July 2007 review by SIGIR found that power station units 5 and 6 – the two rehabilitated with American money in Doura – were not operational because of insufficient maintenance.

In fact, large portions of the aging units were replaced, but key parts that had been "under pressure and heat for 20 years" were not, says Abdulaziz. "It's like a car: If you change just the pistons, and leave everything else, you can't go 200 km [125 miles] per hour."

When Unit 5 went on-line in 2006, its heater burned out within a month and the boiler began to leak. Unit 6, started in 2008, quickly encountered problems, too. Neither unit has come close to its top capacity of 167 megawatts. The US funded effort was "better than nothing ... but I am not satisfied," says Abdulaziz.

With growing demand for electricity, little time exists for critical maintenance. "There is pressure on [the ministry], and so they put pressure on us.... Our people work 24 hours, day and night, because once a unit stops the telephone rings," says the engineer. Replacing the old, weak parts now would require six months or a year. "How can it be done? If I'm telling them I need 45 days, they give me 10 days. It's impossible," the engineer adds. "We are just pushing this thing to the edge of a precipice."

US reconstruction officials cite significant gains in Iraq, from overall electricity production to water projects, especially now that security costs that once ate up to one-fifth of money spent are lower. But the PRTs and USACE will also be wrapping up much of their hands-on role in Iraq in the coming year, as more US forces withdraw.

In the end, the question looms: Were the tens of billions spent for reconstruction of Iraq worth it?

"Compare it to the Marshall Plan, when Germany and all of Europe was broken," says Roche of USACE, referring to the US initiative to rebuild Europe after World War II. "We probably spent the equivalent of $100 billion. You have to put a foundation in place. Germany and Japan now have their own engineers and are building their own stuff. It will be the same with Iraq, too."

• Mohammed al-Dulaimy and Jamal Naji contributed to this report from Iraq.