Leading article: The right kind of aid

For too long, US aid for Pakistan has meant aid for the military. Over the decades huge amounts of money have disappeared into the pockets of corrupt officials or – worse – ended up with the intelligence services, whose ties to the Taliban in neighbouring Afghanistan are now notorious. Too little went on improving the lives of ordinary people. Washington, fortunately, seems to have learned that lesson, however late in the day.

Following the $7.5bn that Congress allocated last October for development projects over five years, the US Secretary of State, Hillary Clinton, yesterday unveiled another $500m, the announcement timed to coincide with her touchdown in Islamabad, en route to a development conference in Kabul. The money is to be targeted towards dam projects, improving the electricity supply and helping small business start-ups.

This change in priorities over Pakistan, which has been very marked under the Obama administration, could not be more timely. Pakistan's collapse into total anarchy, often predicted, has not happened. The fractured nature of its society militates against such a development; lawlessness and religious extremism, so endemic in the north-west, co-exist with peace, modest prosperity and a different religious climate in other provinces. The country has a far bigger middle class, an important stabilising factor, than outsiders give it credit for.

Nevertheless, the country's condition is worrying, particularly as it possesses nuclear weapons. Meanwhile a strain of violently anti-Western Islam continues to seep out of its former heartland among the so-called tribal districts on the Afghan border, feeding on a toxic combination of poverty, frustrated nationalism and a feeling that Pakistan is a frontline in someone else's war. Resentment of the West, and America in particular, is widespread. Britain, with its powerful demographic connection to Pakistan, is also affected by this more hostile mood.

There is only a limited amount that outside countries can do to counter these trends, especially when so much of the country's education has fallen into the hands of religious madrassas, busy feeding the next generation on a diet of pure Islam. That does not mean we should give up. Pakistan is too important for that. Rather, foreign aid needs to be targeted to the country's weak and fragmented civil society. More dams, more power grids, more computers, more schools not run entirely by clergy. More help for the judiciary, so people do not abandon faith in a secular justice system. More, in fact, of what Mrs Clinton seems to be doing right now.