The world is aging fast and many countries, even wealthier ones, aren’t prepared for it, according to a new index accessing the economic well-being of elderly people around the world.

In most cases wealthy countries outranked poorer ones in terms of supporting their elderly populations. Sweden and Norway were at the top of the index while Pakistan, Tanzania and Afghanistan ranked last. The index, compiled by the United Nations and the elderly rights group HelpAge International, looked at areas including income security, life expectancy, and employment, education and social support of elderly people. By 2050, people over the age of 60 will outnumber those under the age of 15, the report said.

But economic prosperity of a country doesn’t always translate into good care for aging communities. That drives home the point that policy decisions matter, the report said. Sri Lanka ranked 36th out of 91 countries. Poorer Latin American countries like Uruguay and Panama ranked better than all of the so-called BRICS nations whose economies have swelled over the last several years. Chile and New Zealand also did better in the index than their GDPs would suggest, ranking ahead of Spain and Italy, the report noted.

Most surprising is South Korea, one of the most developed economies in the world, which ranked 67th. The country had the lowest ranking in Asia in terms of income security for the elderly. That’s because the poverty rate is high among the elderly: 45.1% of South Koreans 65 and over live on less than half of the country’s the median household income, as of 2011. (The OECD average is 13.5%.)

The reason? Companies often force employees in their 50s to retire, out of preference for younger workers. Also, the country’s public pension scheme was only established in 1988, so that people who retired in the mid-2000s have had little or no retirement, the report noted.