The international community is in danger of repeating in Afghanistan the mistakes made in Iraq. Millions of Afghans have seen little material improvement in their lives since 2001, and most still live in desperate poverty. From the start, the damage inflicted by a quarter-century of war was underestimated; this is not about repairing the state but building it from scratch.

Rural communities have seen some improvements, but essential services are scarce or inadequate. In provinces where Oxfam works such as Daikundi, there is no mains water or electricity, and virtually no paved roads. Average life expectancy in Daikundi is 42 and one in five children dies before the age of five. Afghan children chew on mud they scratch from the walls of their homes to stave off hunger.

Most reconstruction work has focused on urban centres and national institutions and structures. It has been supply-driven, not needs-driven. Development urgently needs to go local, but there is confusion among state institutions about their roles, and district councils provided for by the constitution have yet to be elected. For ordinary Afghans, the local or tribal council of elders - the shura or jirga - constitutes the central authority. Yet these bodies have been largely neglected in the state-building process.

Four things need to be done: building the capacity of local government to deliver essential services at ground level; achieving a coherent system of sub-national governance; directing resources to communities to help them help themselves; and supporting economic regeneration, especially in rural trades and non-opium agriculture.

America is bankrolling Afghanistan. It is responsible for more than half of all aid to the country (aid that accounts for about a third of GDP), and it plans to provide $10.6bn in the next two years. But as in Iraq, a vast proportion of aid is wasted. Political pressure in donor countries for rapid results has led to projects that are unsuitable and unsustainable. Most aid money goes to programmes in the opium-intensive, insecure provinces in the south. To neglect secure provinces is to invite the insurgency to spread.

Close to half of US development assistance goes to the five biggest US contractors in the country. Too much money is lost to high salaries and living costs, non-Afghan resources and corporate profits. The overall cost of one expatriate consultant is about half a million dollars a year. International contractors are indispensable, but there needs to be rigorous scrutiny, with targets for increased use of Afghan resources. An aid ombudsman could monitor complaints and make recommendations.

There is rising anger about civilian casualties, particularly at the hands of US units outside Nato command - a recent assault in western Afghanistan left 50 civilians dead, and in the past six weeks coalition forces have killed up to 100 civilians, compared with about 230 for the whole of 2006. If international forces lose the support of the people, militants and insecurity will spread.

A third of Afghans think democracy is incompatible with Islamic values, and many resent the massive foreign presence. If rapid steps are not taken to improve the delivery of aid and to control the excessive use of force, there could be devastating consequences. At the same time, action is required at regional level to crack down on insurgents, control narcotics, manage refugees and promote trade and investment.

Achieving peace in Afghanistan is not an impossible task. But the mistakes of Iraq are being repeated; without a change of course the consequences are too awful to imagine.

· Matt Waldman is Oxfam's head of policy for Afghanistan

MWaldman@oxfam.org.uk