Brazil is enduring its sharpest economic downturn in decades, hemorrhaging jobs and depleting contributions to the pension system. The Federal Revenue Service said such payments plunged 9 percent in August.

Then there is Brazil’s plummeting fertility rate — which recently dropped to 1.77 children per woman, below the rate needed for the population to replace itself — which will eventually put even more pressure on a pension system already under intense strain.

This shift partly reflects higher living standards in recent decades and broader availability of birth control, but it will result in fewer young people to support a much larger older population. As recently as 1980, Brazil’s fertility rate was 4.3 children per woman, according to the United Nations.

And the average life expectancy in Brazil has climbed to 74.9 years in 2013, from 62.5 years in 1980, according to government statistics. Instead of building a surplus now to prepare for an onslaught of new pension obligations, scholars say, Brazil is squandering a demographic bonus that will soon fade.

Economists note that Brazil already spends more than 10 percent of its gross domestic product on public pensions, similar to what southern European countries with much older populations have recently spent, according to the Organization for Economic Cooperation and Development. Unless changes are made, an even bigger shock is expected here, given that the population of people 60 or older is expected to reach about 14 percent of the overall population in just two decades, up from about 7 percent now.

But the biggest challenge that political leaders across the ideological spectrum face is one they helped create: the generosity of Brazilian pensions.