Last week, seven European countries pledged to stop important support for fossil-fuel projects abroad. They join the United States and other European countries in stopping funding for energy infrastructure projects in poor countries that depend on coal, gas and oil. This blanket ban will entrench poverty in regions such as sub-Saharan Africa, but do little to reduce the world’s carbon emissions.

Africa accounts for around 17% of the world’s people but less than 4% of annual global carbon emissions. It is not fair for rich countries to fight climate change at the cost of low-income countries’ development and climate resilience. Instead, rich countries should help African governments to pursue a broad portfolio of energy sources for rapid, sustainable development.

The fossil-fuel infrastructure that already exists in Africa is carbon-intensive and serves its wealthiest countries. South Africa and several North African countries together hold two-thirds of the continent’s electricity-generation capacity. The other 48 countries have a capacity of only 81 gigawatts between them, out of a total of 244 gigawatts across Africa and 9,740 gigawatts for the world. The average Ethiopian consumes only 130 kilowatt-hours of electricity per year, about the amount the average person in the United States consumes in 4 days.

This imbalance is both a cause and a consequence of Africa’s lack of modern infrastructure. For hundreds of millions of people across Africa, energy is scarce, food is expensive and often imported, and full-time employment is hard to find. Much of what is necessary for development — roads, schools, housing, reliable power — cannot be realized quickly with green power alone.

Natural gas is a fossil fuel, but it could do much to lift communities out of poverty efficiently. It is roughly twice as carbon-efficient an energy source as coal, and is abundant in many African countries outside North Africa, including Nigeria, Mozambique, Angola and the Democratic Republic of the Congo. The Energy for Growth Hub, an international research network, estimates that if the 48 countries tripled their electricity consumption overnight through use of natural gas, the resulting carbon emissions would be less than 1% of the global total (see go.nature.com/3app2ff).

Natural gas also offers the best way to modernize food production and transport. Despite impressive efforts in solar irrigation systems across Africa, natural gas is still better for large-scale agriculture; it is reliable, inexpensive and burns more cleanly than other fossil fuels. It can be stored until needed. It is one of the best feedstocks for producing synthetic fertilizer; it can power cars, buses, trucks and ships, plus cold-storage systems. That means less food will spoil, and farmers can supply more food with less land.

A blanket ban on fossil fuels will do little to propel growth of renewable energies across Africa: that growth is already under way. The electricity for Ethiopia, Kenya, Malawi, Mali, Mozambique and Uganda — which together represent one-fifth of Africa’s population — comes mainly from renewable resources like hydroelectric power. Moreover, fossil-fuel development can be used as renewable sources are built up, laying the groundwork for more ambitious projects. A 2020 PhD thesis (see go.nature.com/3tbfg25) found that ‘dispatchable’ gas-fuelled generators that are movable would be essential for South Africa to transition to renewable electricity, because wind and solar sources would be too variable as they were scaled up. And there is risk in scaling up too fast — the intermittent supply from a large wind farm in Kenya has made the electrical grid costly to operate.

Critics will counter that those with interests in fossil fuels will attempt to squeeze out renewable sources, and that governments might be captured by fossil-fuel lobbies. I understand these concerns, but, speaking as an advocate for sustainability, I believe fossil fuels are still necessary. International finance institutions must prioritize funding for renewable-energy projects whenever possible, and rich countries must invest in research and development that will bring down the costs of renewable energy. They must also not discount the plight of poverty. (Almost 600 million Africans lack reliable access to electricity.) As natural disasters and other climate risks become more common, people’s need for roads, hospitals, resilient power grids, warning systems, robust food supplies and other infrastructure that requires reliable energy will be even greater.

Rather than banning fossil fuels in development projects, the European Union, United States and World Bank should adopt funding criteria that consider economic growth alongside climate impact. For example, the exploitation of a substantial resource of 4.2 trillion cubic metres of natural gas along the Tanzania–Mozambique border would expand access to electricity and generate much-needed revenue in two low-income, low-emitting countries. I can imagine a tiered system in which countries with lower per-capita incomes, low emissions or high use of green energy are deemed more eligible for development projects that depend on fossil fuels. Any infrastructure that is built should be modern and well maintained, to reduce waste caused by leaks and the need to flare methane gas.

Most of the legacy emissions causing global warming came from rich countries, which still rely on fossil fuels. It would be the height of climate injustice to impose restrictions on the nations most in need of modern infrastructure and least responsible for the world’s climate challenges.