Since the millennium, parts of Africa had begun to look more first world than third world. Images of a starving, suffering, war-torn continent were being edged aside by new pictures of shiny office blocks and rush-hour traffic jams. But just as economies in Africa began to show signs of growth - many of them for the first time in three decades - the world was hit by a recession. Investment was withdrawn, demand for exports dived, and remittances sent home by the African diaspora dried up. According to the International Monetary Fund, 15 of the 21 most vulnerable economies in the world are in sub-Saharan Africa.
Until the financial crisis hit Africa towards the end of 2008, the continent's economies had grown at roughly 5 per cent a year on average for four years. Africa was no longer the slowest-growing continent in the world. With debts written off and inflation under control, some former African "basket cases" became profitable places to invest. And it wasn't just oil exporters that were benefiting. Ethiopia, an oil importer which pays heavily for fuel, managed annual growth of about 10 per cent for four years. The continent as a whole was growing faster than Latin America or Europe - and at a rate high enough to keep ahead of its steadily rising population.
For a while, it was thought that Africa might escape the recession. Last year, the IMF revised growth projections in the rest of the world downwards to 3 per cent, but kept Africa's projected rate at 6 per cent. Africa seemed distanced enough from the gambling of western banks and their bad debts not to be dragged down by them. The demand for raw materials from China and other emerging economies would help to carry the continent through, it was suggested, while domestic demand remained strong in many countries, particularly those producing oil.
Yet the world is now too interconnected. America sneezed and Africa is back in casualty. The continent's growth rate is predicted to be just 1 per cent this year - lower, crucially, than the population growth rate of roughly 3 per cent. The African people would be justified in feeling bitter. In the 1980s and early 1990s, their continent was caught in a vicious downward cycle, shunned by investors because of political instability, weak laws, huge debts and poor infrastructure. In the late 1990s, however, investment began to flow back. This was mostly a product of China's demand for Africa's raw materials, but partly attributable to countries reforming and opening up their economies under pressure from western governments. Now the same countries that lectured Africa about proper regulation and debt management have failed to follow their own prescription - and Africa is feeling the pain. Investors are withdrawing not because of any risk or weakness in Africa's economies, but because of panic at home. It gets worse. When African economies were close to collapse and people were starving, western governments militated against state interference. The market must take its course, they said. Nations that were forced to sell off state-owned assets, or let them go under, today watch as western governments nationalise or subsidise their own failing banks.
Will the gains of Africa's economic revival be completely lost? The growth was only partly stimulated by western donors. Much more important was China's move into Africa, probably the most significant geostrategic shift so far in the 21st century. The Chinese demand for raw materials in vast quantities pushed prices to record levels. African rulers granted long-term mining and oil concessions in return for cheap loans and new infrastructure built by state-owned Chinese companies. These large companies were followed by thousands of small businesses and families that came to make a life in Africa by importing Chinese goods or trading African commodities. Between 2000 and 2008, Chinese trade with Africa leapt from $10.6bn to $106.84bn.
But just as China was the main driver of Africa's growth, so it is now an indirect cause of the continent's steep decline. The ultimate consumers of Africa's raw materials were mainly in western countries; China was simply the processor. As world demand for Chinese products declined,
so did China's demand for Africa's resources. Several mines have been put on hold and deals are now being implemented slowly.
Other sources of funding have also dried up. The World Bank estimates that no less than $12bn was sent or taken back to sub-Saharan Africa in 2007 (and the actual figure could be twice that); this is expected to drop in 2010 as Africans in Europe and America, often at the bottom of the job pile, cut back support for their families at home. In Kenya early this year, such remittances declined by 27 per cent. Aid, too, may fall - or at least not grow as promised. At the G8 summit at Gleneagles in 2005, western governments promised to double aid to Africa, raising it to $50bn by 2010, but these countries may now feel too poor to meet their commitment. France and Italy have been singled out for failing to keep to their targets, but discrepancies between what is pledged, spent and delivered are widespread.
Economies across Africa are being hit hard. The biggest, South Africa, is suffering its first recession in almost two decades, and up to half a million jobs have been lost. Botswana - Africa's small success story - is also in recession. It has closed its diamond mines and sought a $1.5bn loan from the African Development Bank. Mauritius, which found a niche with new industries and as a producer of textiles, is seeking a £500m loan. Nigeria's oil-based economy may be strong in the medium term, but it has suffered a haemorrhage of capital and its vibrant stock market has collapsed. Growth reached 10 per cent in 2003, but is estimated to fall below 3 per cent next year. The education budget has been cut by 16 per cent, the health budget by 29 per cent. Earnings from Kenya's crucial flower exports have dropped by 35 per cent, leading to the loss of 1,200 jobs. Its lucrative tourism industry has also been hit (although this may in part be a result of the violence that followed elections at the end of 2007).
Aside from long-term deals with China, African governments will find it hard to borrow in order to finance much-needed infrastructure or to fund short-term deficits. Ghana, Uganda and Kenya have put planned bond issues on hold. South Africa is facing a budget deficit after predicting a surplus for 2009-2010. Governments that do borrow to make up deficits risk rekindling inflation - and for the unprotected poor, inflation is a killer.
However, the picture is not one of uniform or universal decline and an increase in poverty. Although trade levels have dropped, China, which looks 30 years ahead compared to the west's four or five years, is still investing heavily. The Chinese government has responded to the recession by investing some of its $2trn surplus on its own people and infrastructure such as new cities. Its demand for African raw materials may not fall
as sharply as that of other importers. One South African iron ore company reported that its output went evenly to China and Europe until recently. Now 90 per cent goes to China.
While oil, the mainstay of eight African countries including Nigeria, is still unstable and producers will probably have to cope with lower prices, not all commodities have collapsed. Copper, Zambia's main export, fell from $10,000 a tonne to less than $3,000 this year, but has now recovered to about $5,000. Cocoa, produced by Ghana and Côte d'Ivoire, has also remained buoyant, as has gold, a key export for South Africa.
Moreover, much of Africa lies outside the world market. Consequently, the price of food is determined by local weather conditions rather than global economics. Until recently, most Africans relied on locally produced food, and even those who moved to towns could, during hard times, call on relatives back in the villages for supplies. As the urban-rural balance changes, this safety net will become less viable, but at present less than half of the people on the continent live in or around towns.
So how will the recession affect the starving African children we see on the news and in appeals for aid? The answer is: probably not very much, unless western governments become too mean to fund the international aid agencies that keep them alive. Those children who are victims of drought are mostly far outside the world marketplace already. But most of them are victims of war, and therefore of Africa's poisoned politics, not global economic forces.
Much of what constitutes politics in Africa is the manoeuvring of small, capital-based elites within and between their ethnic or religious support bases. Most Africans play no part in their country's politics, apart from (if they are lucky) voting once every few years. But there is one group that governments have to take into account - the urban poor. These people are vulnerable to the smallest shifts in the cost of living and can take to the streets and cause headaches for those in power. When politics breaks down, they provide the foot soldiers for Africa's wars. When prices of food and fuel shot up last year, riots broke out in several African cities.
In the longer term, the first of those two commodities - food - may prove critical to Africa's future. China dominates basic manufacturing globally, and the proportion of its population that works in factories is matched by the numbers of people in rural areas who are ready to come to town and take those jobs. There will be no space in the market for Africa to move from primary producer to manufacturer in the near future. At the same time, China is likely to experience a growing food deficit, as its urban workers seek a better diet. If China's demand for food imports pushes up prices, Africa could exploit its agricultural potential. With vast unused or underused land resources, it has the capacity to feed China as well as itself.
The global financial crisis seems likely to push Africa closer to China and other Asian countries, and away from its historical western partners. Already, African rulers are using their new-found friendship with China to resist western pressure on economic policies, as well as human rights and democracy. With the near-collapse of the western model in its own heartland, any minister or diplomat who lectures African governments over exchange controls, import restrictions or bank regulation will be laughed out of town. After the scandal over British MPs' expenses, any mention of corruption also stands to be mocked. Post-recession Africa, with its new partner, may be a very different place.
Richard Dowden is director of the Royal African Society and author of "Africa: Altered States, Ordinary Miracles", published by Portobello Books (£20)