At the beginning of the Iraq war, the UN entrusted $23bn of Iraqi money to the US-led coalition to redevelop the country. With the infrastructure of the country still in ruins, where has all that money gone? Callum Macrae and Ali Fadhil on one of the greatest financial scandals of all time

In a dilapidated maternity and paediatric hospital in Diwaniyah, 100 miles south of Baghdad, Zahara and Abbas, premature twins just two days old, lie desperately ill. The hospital has neither the equipment nor the drugs that could save their lives. On the other side of the world, in a federal courthouse in Virginia, US, two men - one a former CIA agent and Republican candidate for Congress, the other a former army ranger - are found guilty of fraudulently obtaining $3m (£1.7m) intended for the reconstruction of Iraq. These two events have no direct link, but they are none the less products of the same thing: a financial scandal that in terms of sheer scale must rank as one of the greatest in history.

At the start of the Iraq war, around $23bn-worth of Iraqi money was placed in the trusteeship of the US-led coalition by the UN. The money, known as the Development Fund for Iraq and consisting of the proceeds of oil sales, frozen Iraqi bank accounts and seized Iraqi assets, was to be used in a "transparent manner", specified the UN, for "purposes benefiting the people of Iraq".

For the past few months we have been working on a Guardian Films investigation into what happened to that money. What we discovered was that a great deal of it has been wasted, stolen or frittered away. For the coalition, it has been a catastrophe of its own making. For the Iraqi people, it has been a tragedy. But it is also a financial and political scandal that runs right to the heart of the nightmare that is engulfing Iraq today.

Diwaniyah is a sprawling and neglected city with just one small state paediatric and maternity hospital to serve its one million people. Years of war, corruption under Saddam and western sanctions have reduced the hospital to penury, so when last year the Americans promised total refurbishment, the staff were elated. But the renovation has been partial and the work often shoddy, and where it really matters - funding frontline health care - there appears to have been little change at all.

In the corridor, an anxious father who has been told his son may have meningitis is berating the staff. "I want a good hospital, not a terrible hospital that makes my child worse," he says. But then he calms down. "I'm not blaming you, we are the same class. I'm talking about important people. Those controlling all those millions and the oil. They didn't come here to save us from Saddam, they came here for the oil, and so now the oil is stolen and we got nothing from it." Beside him another parent, a woman, agrees: "If the people who run the country are stealing the money, what can we do?" For these ordinary Iraqis, it is clear that the country's wealth is being managed in much the same way as it ever was. How did it all go so wrong?

When the coalition troops arrived in Iraq, they were received with remarkable goodwill by significant sections of the population. The coalition had control up to a point and, perhaps more importantly, it had the money to consolidate that goodwill by rebuilding Iraq, or at least make a significant start. Best of all for the US and its allies, the money came from the Iraqis themselves.

Because the Iraqi banking system was in tatters, the funds were placed in an account with the Federal Reserve in New York. From there, most of the money was flown in cash to Baghdad. Over the first 14 months of the occupation, 363 tonnes of new $100 bills were shipped in - $12bn, in cash. And that is where it all began to go wrong.

"Iraq was awash in cash - in dollar bills. Piles and piles of money," says Frank Willis, a former senior official with the governing Coalition Provisional Authority. "We played football with some of the bricks of $100 bills before delivery. It was a wild-west crazy atmosphere, the likes of which none of us had ever experienced."

The environment created by the coalition positively encouraged corruption. "American law was suspended, Iraqi law was suspended, and Iraq basically became a free fraud zone," says Alan Grayson, a Florida-based attorney who represents whistleblowers now trying to expose the corruption. "In a free fire zone you can shoot at anybody you want. In a free fraud zone you can steal anything you like. And that was what they did."

A good example was the the Iraqi currency exchange programme (Ice). An early priority was to devote enormous resources to replacing every single Iraqi dinar showing Saddam's face with new ones that didn't. The contract to help distribute the new currency was won by Custer Battles, a small American security company set up by Scott Custer and former Republican Congressional candidate Mike Battles. Under the terms of the contract, they would invoice the coalition for their costs and charge 25% on top as profit. But Custer Battles also set up fake companies to produce inflated invoices, which were then passed on to the Americans. They might have got away with it, had they not left a copy of an internal spreadsheet behind after a meeting with coalition officials.

The spreadsheet showed the company's actual costs in one column and their invoiced costs in another; it revealed, in one instance, that it had charged $176,000 to build a helipad that actually cost $96,000. In fact, there was no end to Custer Battles' ingenuity. For example, when the firm found abandoned Iraqi Airways fork-lifts sitting in Baghdad airport, it resprayed them and rented them to the coalition for thousands of dollars. In total, in return for $3m of actual expenditure, Custer Battles invoiced for $10m. Perhaps more remarkable is that the US government, once it knew about the scam, took no legal action to recover the money. It has been left to private individuals to pursue the case, the first stage of which concluded two weeks ago when Custer Battles was ordered to pay more than $10m in damages and penalties.

But this is just one story among many. From one US controlled vault in a former Saddam palace, $750,000 was stolen. In another, a safe was left open. In one case, two American agents left Iraq without accounting for nearly $1.5m.

Perhaps most puzzling of all is what happened as the day approached for the handover of power (and the remaining funds) to the incoming Iraqi interim government. Instead of carefully conserving the Iraqi money for the new government, the Coalition Provisional Authority went on an extraordinary spending spree. Some $5bn was committed or spent in the last month alone, very little of it adequately accounted for.

One CPA official was given nearly $7m and told to spend it in seven days. "He told our auditors that he felt that there was more emphasis on the speed of spending the money than on the accountability for that money," says Ginger Cruz, the deputy inspector general for Iraqi reconstruction. Not all coalition officials were so honest. Last month Robert Stein Jr, employed as a CPA comptroller in south central Iraq, despite a previous conviction for fraud, pleaded guilty to conspiring to steal more than $2m and taking kickbacks in the form of cars, jewellery, cash and sexual favours. It seems certain he is only the tip of the iceberg. There are a further 50 criminal investigations under way.

Back in Diwaniyah it is a story about failure and incompetence, rather than fraud and corruption. Zahara and Abbas, born one and a half months premature, are suffering from respiratory distress syndrome and are desperately ill. The hospital has just 14 ancient incubators, held together by tape and wire.

Zahara is in a particularly bad way. She needs a ventilator and drugs to help her breathe, but the hospital has virtually nothing. Her father has gone into town to buy vitamin K on the black market, which he has been told his children will need. Zahara starts to deteriorate and in desperation the doctor holds a tube pumping unregulated oxygen against the child's nostrils. "This treatment is worse than primitive," he says. "It's not even medicine." Despite his efforts, the little girl dies; the next day her brother also dies. Yet with the right equipment and the right drugs, they could have survived.

How is it possible that after three years of occupation and billions of dollars of spending, hospitals are still short of basic supplies? Part of the cause is ideological tunnel-vision. For months before the war the US state department had been drawing up plans for the postwar reconstruction, but those plans were junked when the Pentagon took over.

To supervise the reconstruction of the Iraqi health service, the Pentagon appointed James Haveman, a former health administrator from Michigan. He was also a loyal Bush supporter, who had campaigned for Jeb Bush, and a committed evangelical Christian. But he had virtually no experience in international health work.

The coalition's health programme was by any standards a failure. Basic equipment and drugs should have been distributed within months - the coalition wouldn't even have had to pay for it. But they missed that chance, not just in health, but in every other area of life in Iraq. As disgruntled Iraqis will often point out, despite far greater devastation and crushing sanctions, Saddam did more to rebuild Iraq in six months after the first Gulf war than the coalition has managed in three years.

Kees Reitfield, a health professional with 20 years' experience in post-conflict health care from Kosovo to Somalia, was in Iraq from the very beginning of the war and looked on in astonishment at the US management in its aftermath. "Everybody in Iraq was ready for three months' chaos," he says. "They had water for three months, they had food for three months, they were ready to wait for three months. I said, we've got until early August to show an improvement, some drugs in the health centres, some improvement of electricity in the grid, some fuel prices going down. Failure to deliver will mean civil unrest." He was right.

Of course, no one can say that if the Americans had got the reconstruction right it would have been enough. There were too many other mistakes as well, such as a policy of crude "deBa'athification" that saw Iraqi expertise marginalised, the creation of a sectarian government and the Americans attempting to foster friendship with Iraqis who themselves had no friends among other Iraqis.

Another experienced health worker, Mary Patterson - who was eventually asked to leave Iraq by James Haveman - characterises the Coalition's approach thus: "I believe it had a lot to do with showing that the US was in control," she says. "I believe that it had to do with rewarding people that were politically loyal. So rather than being a technical agenda, I believe it was largely a politically motivated reward-and-punishment kind of agenda."

Which sounds like the way Saddam used to run the country. "If you were to interview Iraqis today about what they see day to day," she says, "I think they will tell you that they don't see a lot of difference".

· Dispatches: Iraq's Missing Billions produced by GuardianFilms is broadcast tonight on Channel4 at 8pm.