The author is a Reuters Breakingviews columnist. The opinions expressed are her own.

Spain may have one of the fastest growing economies in the European Union but its demographics are a ticking time bomb. Consensus and long-term planning are needed to tackle the burden this will place on the welfare system and growth prospects. Slim chance when political gridlock is forcing national elections to be repeated for the first time in modern history.

While less than a fifth of Spaniards were aged 65 or more in 2015, by 2050, this cohort will account for a third of the population, one of the highest proportions in the region, according to the European Union statistics office. The fertility rate is one of the lowest in Europe at 1.32 births per woman. Spain’s baby-boom generation was born later than in other countries, and life expectancy is high at 86.1 years for Spanish women – longer than their peers in other EU countries. Net emigration makes matters worse. The population has been shrinking since 2012 and will by 2029 lose roughly 1 million people, or 2.2 percent of the total, the national statistics institute predicts.

Fewer workers will end up supporting a growing number of older Spaniards. The so-called old-age dependency ratio, which measures the proportion who are 65 or older relative to those aged between 16 and 64 will more than double by 2050, to 62.3 percent. Only Portugal and Greece have a higher ratio.

Granted, long-term projections are far from perfect. But they illustrate the risks. Under the current pay-as-you-go system, pensions will be worth some 30 percent less in real terms by 2050, economist Javier Gimenez-Diaz estimates. The health system, which is managed by the country’s regions, will be stretched and the long-term growth rate will suffer. Bank of America Merrill Lynch economists estimate Spain’s long-term growth potential at best matches that of Italy, which investors typically view as being more sluggish and less reform-friendly. Measures to boost growth, attract migrants, and overhaul the pension system might help Spain. They may not be adopted anytime soon given politicians couldn’t even agree on the formation of a coalition government, let alone what it should do.