The world's continuing dedication to a set of global goals to fight poverty, hunger and disease is no small triumph in an era marked by cynicism, the fraying of social bonds and the widespread fears of economic dislocation. The millennium development goals have come through a week of UN summitry not only intact but invigorated. The goals, it turns out, are doing double duty: helping the poor countries to fight poverty and the rich countries to preserve a sense of social solidarity.

The surprising fact of this year's MDG summit, marking the 10th year of goals with five years left till the target date of 2015, was the widespread social progress that had been made since 2000. Africa, the hot spot of their challenge, is undoubtedly in better shape today than when they were launched. Most of the continent's wars are scaled back or ended. Most of the continent is enjoying economic growth and, for many, at the highest levels since independence. The Aids, TB, and malaria pandemics are at least partly in check. Child mortality rates are declining.

These gains are being achieved despite recession in the US and Europe, which in earlier times might have sent Africa into a tailspin. It used to be said that when the US and Europe caught a cold, the developing world caught pneumonia. No longer. The poor countries are going about their business while the developed economies convalesce.

There are at least four reasons. The first is China. China was everywhere at the MDG summit, with PM Wen Jiabao and team declaring eloquently China's intention to engage deeply with Africa, fighting AIDS, investing in infrastructure and industry, and buying Africa's export commodities. Where China is today, India will follow soon.

The second is technology. When the goals were launched, most rural Africans had never used a phone. Now, mobile telephony is ubiquitous, and wireless broadband not far behind. Medicine, rapid diagnostics, anti-malaria bed nets, improved seeds, low-cost irrigation, and others are driving down poverty.

The third is business. Africa is reaching a point in which large-scale foreign and domestic investments in mining, agriculture, banking and information technologies will begin to promote a virtual circle of self-sustaining growth. Major companies are recognising a real market in Africa and regard the social investments in education and health as areas in which they can and should participate.

The fourth is governance. The MDGs have played a crucial role. Dozens of countries are watching themselves in the mirror on poverty, hunger, disease and infrastructure. They are checking their rankings, the indicators showing their prospects to reach the MDGs, and have revised budgets to expand education and health. Yet while Norway, in particular, and the UK have been extraordinary in their commitment to the MDGs, the overall rich-world MDG behaviour is no cause for celebration. The rich countries have occasionally innovated, most importantly by creating the Global Fund to Fight Aids, TB, and Malaria, but more often have fallen short on aid commitments, from Monterrey in 2002 to L'Aquila in 2009. Obama's MDG speech to the UN on Wednesday was lacklustre. He didn't mention his flagship initiative on food production launched at L'Aquila, showing the irresolution of US policy. The president believes he can't carry the Congress on these issues. This is uncertain, since he's hardly tried.

There are serious reasons to worry about the successful achievement of the goals by 2015. Africa is buffeted by soaring populations, and climate change could yet make a tragic mockery of the best-laid plans. Yet the main battle may not be technical but ethical. The world is living through a moral crisis, in which our societies are struggling to adapt to new realities of globalisation.

The MDG summit took place in the same days that Sweden saw a far-right, anti-immigrant party take seats in parliament. France is harassing the Roma for local political gain. The US is in the throes of anti-Islamic fever, a rightwing Tea Party challenge and anti-immigrant fervour. High unemployment, economic uncertainty and political manipulation of the public by various interests threaten our very social stability. For many, Africa is a target of racism and opprobrium, not partnership.

The moral crisis in Europe and the US is even deeper than ethnic and racial divisions. An age when we should be celebrating our unprecedented affluence and productivity has become an age of fear and even loathing, when basic values of social solidarity, compassion, succour for the poor and mutual responsibility are under unprecedented threat. It is all the more remarkable and important that the millennium goals still attract our focus, as an inspiration, challenge, and as a reminder of our common humanity and shared responsibility. They may yet save us all, rich and poor together.

Jeffrey Sachs is director of the Earth Institute at Columbia University and author of Common Wealth