Japan’s economy is now the world’s fourth-largest after it contracted in the last quarter of 2023 and fell behind Germany.

The government reported the economy shrank at an annual rate of 0.4 percent from October to December, according to Cabinet Office data on real GDP released Thursday, though it grew 1.9 percent for all of 2023.

Two straight quarters of contraction are considered an indicator an economy is in a technical recession.

Japan’s economy was the second largest until 2010 when it was overtaken by China. Japan’s nominal GDP totaled $4.2 trillion last year, while Germany’s was $4.4 trillion, or $4.5 trillion, depending on the currency conversion.

A weaker Japanese yen (the official currency) was a key factor in the drop to fourth place since comparisons of nominal GDP are in dollar terms.

But Japan’s relative weakness also reflects a decline in its population and lagging productivity and competitiveness, economists say.

Both the Japanese and German economies are powered by strong small and medium-sized businesses with solid productivity.

Like Japan in the 1960s-1980s, for most of this century, Germany roared ahead, dominating global markets for high-end products like luxury cars and industrial machinery, selling so much to the rest of the world that half its economy ran on exports.

As an island nation with relatively few foreign residents, Japan’s population has been shrinking and aging for years, while Germany’s has grown to nearly 85 million, as immigration helped to make up for a low birth rate.

The gap between developed countries and emerging nations is shrinking, with India likely to overtake Japan in nominal GDP in a few years.

The U.S. remains the world’s largest economy by far, with a GDP of $27.94 trillion in 2023, while China’s was $17.5 trillion. India is about $3.7 trillion but growing at a sizzling rate of around seven percent.