Achieving the ambitious Sustainable Development Goals – which aim to end poverty, boost shared prosperity, and promote sustainability, between now and 2030 – will require overcoming some major obstacles, ranging from securing enough financing to addressing climate change to managing macroeconomic shocks. But there is one potential obstacle that could turn out to be a blessing in disguise: the diverse demographic shifts that will take place in the coming years.

By the time the SDG agenda reaches its end date, there will be an estimated 8.5 billion people worldwide. Twenty years later – just 34 years from now – there will be nearly ten billion, or nearly 2.5 billion more people than there are on Earth today. What will such a world look like? Where will those additional people live? How will they make their living? Will they bolster or weigh down national economies?

For clues, we can look 35 years in the past, to the early 1980s. US President Ronald Reagan, Chinese leader Deng Xiaoping, British Prime Minister Margaret Thatcher, French President François Mitterrand, and Soviet President Mikhail Gorbachev dominated the world’s headlines. Personal computer sales were miniscule. And children competed over Rubik’s cubes, rather than augmented-reality Pokémon.

At that time, the world’s population was about 4.5 billion, 42% of whom – almost two billion – lived in extreme poverty. Excessive population growth, it was feared, would outpace agricultural production and create yet more poverty.

Global poverty by percentage 1990-2015
Image: World Bank

Yet the Malthusian predictions were wrong. Although the world population has surged to 7.5 billion, only about 750 million people – just 10% of the total population – live in extreme poverty today. China and India, in particular, lifted hundreds of millions out of poverty in recent decades, increasing their citizens’ incomes and improving their health.

China and India achieved this partly by strengthening institutions and pursuing policies that supported strong, relatively inclusive growth. China, for its part, also took advantage of a “demographic dividend”: fertility rates fell, and the labor force grew faster than the dependent population, freeing up resources to invest in people and capital. This produced higher growth and living standards.

Such a dividend can run for decades. And, for China, it has, though it is now reaching its conclusion. For India and other developing countries, however, the demographic dividend is just starting to be felt. In fact, fully 90% of global poverty is concentrated in countries with growing working-age populations, creating an important opportunity for rapid poverty reduction in the coming decades.

For example, in Sub-Saharan Africa, which is currently plagued with high levels of extreme poverty, children under 15 years of age account for 43% of the total population. When these children are old enough to enter the labor force, the proportion of income-earners in the economy could be increased substantially, boosting average per capita incomes.

But not all countries are set to benefit from a “youth bulge.” Between now and 2030, several middle-income countries will experience a decline in the share of the working-age population. Among other things, this reflects the tendency, supported by empirical evidence, for higher incomes to impel households to delay having children.

Even here, however, the demographic news is not all bad – and not just because the shift from higher to lower fertility typically correlates with a shift from lower to higher life expectancy. History suggests that there is a second type of demographic dividend – one that actually lasts longer and is more durable than the first – which emerges when the accumulated savings of an aging population produce a surge in investment. Many wealthier countries have followed this path.

But reaping a demographic dividend takes work. As the World Bank Group’s 2015/2016 Global Monitoring Report emphasized, countries’ policy responses make all the difference in how demographic trends affect the wellbeing of the population. With the wrong approach, a surging youth population can be destabilizing, and a rapidly aging population can become a burden on economic growth and public budgets.

For countries with a growing working-age population, the key challenge is to generate a large number of productive jobs. For those with an aging population, it is to improve productivity and adapt social-welfare systems. In both cases, investment in human capital and an enabling environment for businesses to boost employment are essential.

Furthermore, countries should take advantage of differences in their demographic situations with appropriate policies on cross-border capital flows, migration, and trade. More capital should flow to countries with younger populations – with their growing manufacturing bases and consumer markets – to support investment and employment growth; and more labor should flow to countries with aging populations, to fill gaps in the workforce.

For all of these policies to work, countries need to improve the effectiveness and credibility of their civic and government institutions. Mitigating uncertainty, in order to avoid fueling instability, is also essential.

The last 35 years prove that a larger population does not have to be poorer. While the increasing concentration of the poor in fragile and conflict-affected countries will compound the challenge of poverty reduction over the next few decades, this is no excuse for not ensuring continued progress. We have the resources and knowledge to achieve far greater prosperity, equity, and sustainability. The real challenge will be to use them effectively.