Remember the “PIGS,” short for Portugal, Italy, Greece and Spain? The market is loving the sound they make—for now.

The eurozone economy is growing nicely after a long period of underperformance relative to the U.S. Not all countries are doing equally well, but unlike in the past it is the eurozone’s industrial core, namely Germany, that is now lagging behind less-wealthy countries in southern Europe. Whereas German gross domestic product is only 0.3% larger than before the pandemic, Portugal, Italy and Spain have grown 6.1%, 4.6% and 3.7%, respectively, FactSet data shows.

Stock-market performance mirrors the economic trend: Italy’s FTSE MIB and Greece’s Athex Composite have delivered total returns of 37% and 36%, respectively, over the past year. That beats the S&P 500, which is up 29% thanks to its “Magnificent Seven” technology-related behemoths and hit an all time-high this week. Spain’s IBEX 35 has returned 28%, which still leaves France’s CAC 40 and Germany’s DAX in the dust.

Four of the top-10 performers in the Stoxx Europe 600 index over the past year are Italian and Spanish banksBanca Monte dei Paschi di SienaBanco de SabadellBanca Popolare di Sondrio and UniCredit. In Greece and Italy, yields on 10-year government bonds have gone from trading roughly 2 percentage points above Germany’s to around 1 percentage point.

This is an impressive turnaround for nations that many investors saw as irredeemable basketcases following the eurozone crisis of 2011 and 2012.

The global glut in manufactured goods and China’s slowdown have hit export-focused Germany worse than southern Europe, which is more services based. The end of readily available Russian energy has also been easier to absorb on the Mediterranean. Spain and Portugal imported most of their gas, respectively, from Algeria and Nigeria in the first place. Italy was dependent on Russia, but has been able to pivot quickly toward Algeria and Azerbaijan. As a result, inflation has eased faster in southern Europe, supporting consumer spending.

True, April’s growth in consumer prices edged up to 3.3% from a year earlier in Spain, even as it came in soft in Germany and France, but this was in part because of a tourism boom. Meanwhile, Italy and Greece have benefited from a surge in investment in homes, respectively driven by tax incentives for building works and “golden visa” programs—both of which are now being tightened.

Big budget deficits of almost 4% of GDP, compared with around 1% before the pandemic, have provided a further boost. Public investment has risen thanks in part to European Union recovery funds, which since 2021 have channeled billions of euros into green sectors and industries hit by the pandemic.

Can the PIGS take over as the leaders of European growth? There are reasons to be skeptical.

For one, post-Covid effects such as pent-up travel demand will likely fade. Also, to the extent that the growth spurt is realigning southern Europe jobless levels with northern European after the dismal post-2011 period, it may also have short legs.

As Oxford Economics Senior Economist Paolo Grignani highlighted in a report this month, many European nations came into the pandemic with very high unemployment rates, and it is there that job gains have been largest. This means growth in terms of GDP per worker has been poor, particularly in Spain and Greece. In other words: The injection of much-needed demand has been a blessing for these countries, but the endemic supply-side issue of low productivity since they entered the euro in 1999 hasn’t gone away.

Of course, a hot economy should have positive effects on productivity once the labor market comes closer to full employment, as companies invest in capital to avoid higher labor costs. There are signs that this is now happening in the U.S.

In Europe, though, fiscal austerity is back. The European Parliament last month approved a new set of fiscal rules designed by the 27 EU states. They will allow for more bespoke adjustment plans, but nevertheless force national governments to return to an arbitrary “structural” deficit below 1.5% and a debt-to-GDP ratio below 60%. This is a self-inflicted wound as the bloc tries to catch up with American and Chinese industrial policy.

International investors can find opportunities in a resurgent European periphery. They just need to avoid buying a pig in a poke.

Write to Jon Sindreu at jon.sindreu@wsj.com