“I AM PROUD of my country,” says Aleksander Kwasniewski, Poland’s president from 1995 to 2005. And well he might be when it is celebrating a series of happy anniversaries: ten years of European Union membership, 15 since it joined NATO and 25 since the fall of communism in eastern Europe. Not since the days of the Jagiellonian kings in the 16th century, when Poland stretched from the Baltics almost to the Black Sea, has it been so prosperous, peaceful, united and influential.

When the Iron Curtain came down in 1989, Poland was nearly bankrupt, with a big, inefficient agricultural sector, terrible roads and rail links and an economy no bigger than that of neighbouring (and much larger) Ukraine. At the time the ex-communist countries with the best prospects were widely thought to be Czechoslovakia and Hungary. Hopes for Poland were low.

But rigorous economic shock therapy in the early 1990s put Poland on the right track. Market-oriented reforms included removing price controls, restraining wage increases, slashing subsidies for goods and services and balancing the budget. The cure was painful, but after a couple of years of sharp recession in 1990-91 Poland started to grow again. It has not stopped since, and received a further boost when it joined the EU in 2004. Since then economic growth has averaged 4% a year. GDP per person at purchasing-power parity is now 67% of the EU average, compared with 33% in 1989, and the economy is almost three times the size of Ukraine’s. The country has redirected much of its trade from its eastern neighbours to the EU, started to modernise its transport infrastructure and restructured some of its ailing state-owned industrial behemoths.

Poland was the only big economy in Europe to avoid a recession during the financial crisis, thanks partly to luck and partly to a mixture of deft fiscal and monetary policies, a flexible exchange rate for the zloty, a still modest exposure to international trade and low household and corporate debt. Last year its GDP, at 1,632 billion zloty (€381 billion, $516 billion), was more than one-fifth higher than at the beginning of the crisis. The finance ministry forecasts growth of more than 3% this year. That solid economic performance has given Poland extra weight in the EU, both economically and politically. It is now seen as one of the half-dozen big member countries, alongside Germany, Britain, France, Italy and Spain (though its GDP per person last year, $10,100 at current exchange rates, was still less than half the size of Spain’s). German-Polish ties have become arguably the second most important bilateral relationship in the EU, after the Franco-German axis. Since the beginning of the crisis in Ukraine, policymakers both in the EU and in America have been paying a lot of attention to Donald Tusk, Poland’s prime minister, and Radek Sikorski, his foreign minister. Poland and the Baltic states are the easternmost parts of both the EU and NATO and, as Mr Sikorski puts it, “we feel the vibes here very strongly.” In spite of turbulent relations in the past, since the fall of the Soviet empire Poland has been a staunch supporter of an independent, free and strong Ukraine—not least as a buffer between Poland and Russia.

Concentrating minds

Instability to the east is a worry: last year Poland got 60% of its gas from Russia. Politically, though, the crisis initially helped Mr Tusk at a time when ratings for him and his centre-right Civic Platform (PO) had been sliding badly as the economy slowed and unemployment rose. Still, strong foreign policy has not been able to reverse a public perception of arrogance, complacency and even sleaze. The botched response to a bugging scandal last week, in which security police raided an editorial office, stoked disquiet further. That may help the opposition Law and Justice (PiS) do well in local elections this autumn, and in national and presidential elections next year. Its own stint in office, in 2005-07, was shambolic. But memories of that are fading.

Whoever gets to form the next government will have his work cut out. Poland’s economic transformation is still unfinished, with more reforms needed in sectors such as agriculture, and stark differences remaining between the country’s prosperous west and its poor east. One big decision will be whether and when to join the euro zone. Two-thirds of the Polish public currently oppose this, and relinquishing the zloty would require a constitutional change that for the moment seems unachievable.

Janusz Jankowiak, chief economist of the Polish Business Roundtable, a pro-business lobby group, is optimistic about Poland’s prospects for the rest of this decade but more doubtful about the longer term. Poland has already benefited from a €102 billion ($139 billion) cash inflow from Brussels and is set to receive another €106 billion between now and 2020. The risk is that the government will spend a big chunk of it on infrastructure so that it can show tangible results soon, neglecting longer-term efforts to make the economy more competitive, such as investment in vocational training or higher education. Many Poles are aware that other EU countries have missed their chance of using EU funds for structural reforms. “Portugal has good highways but no competitive companies,” says Mr Jankowiak. For now the main plank of Poland’s success is cheap labour, which western European and American companies are using to turn the country into a big outsourcing and subcontracting hub. But in time that advantage is bound to be eroded.

The biggest challenge for Poland’s economy is to avoid the middle-income trap, getting stuck at its current level. Poles are not saving and investing enough for the economy to make the leap from being western Europe’s main subcontractor to an economy with global, innovative Polish companies. Between 2004 and 2011 the average saving rate was only 17% of GDP and the average investment rate 21% of GDP, both below average EU levels. Current expenditure on R&D is just 0.85% of GDP, though Mateusz Szczurek, the finance minister, foresees an increase to 2% of GDP by 2020.

Daniel Boniecki at the Warsaw office of McKinsey, a consultancy, identifies three “pillars of change” for his country: Poland must close the productivity gap with western Europe; invest in growth industries such as specialist machinery; and become more global. Polish firms’ productivity per hour is still only around 60% of companies in the EU15 countries (the members before enlargement to the east), partly because training and equipment lag behind and partly because companies are badly managed. Polish firms are good at enhancing a product before putting it on the market, but mostly for foreign outfits or by using foreign technology. The majority of firms lack scale and tend to focus on the domestic or regional market. The only truly global Polish company is the state-controlled KGHM, one of the world’s largest copper and silver miners.

Demography is another headache. Poland has one of the lowest fertility rates in the EU and remains an emigration country. If things turn ugly in Ukraine there could be a large wave of refugees flooding into Poland, but that would not solve the problem. “The demographic tsunami will hit just when EU funds dry up,” predicts Krzysztof Rybinski, rector of Vistula University. He has already seen a marked drop in the number of Polish students at his university, so he is looking abroad for new recruits.

The most urgent task for Poland, however, is to slim down its bloated public sector. Since the end of communism the number of civil servants has nearly tripled, to at least 460,000. Successful private companies are being held back by an overly bureaucratic public sector. That is one reason why some of the best and brightest Poles continue to emigrate.

But at least they carry their head high when they go. These days Poland’s voice abroad once again counts for something.