NO ONE would have called António Costa, Portugal’s Socialist prime minister, a fiscal hawk when he took office in November 2015. After finishing second to the centre-right Social Democrats in an inconclusive general election, he cobbled together a coalition with the far left, promising to “turn the page on austerity”. Conservatives dubbed his pact with radicals and communists the geringonça, a term for an improbable contraption. He pledged both to reverse the austerity measures attached to Portugal’s bail-out during the euro crisis and to meet stiff fiscal targets. Many called it voodoo economics.

Yet Mr Costa has kept his word. In 2016, according to figures released on March 24th, his government cut the budget deficit by more than half to just under 2.1% of GDP (see chart), the lowest since Portugal’s transition to democracy in 1974. His administration restored state pensions, wages and working hours to pre-bail-out levels, and also brought the deficit well under the 2.5% target set for it by the European Union. It is the first time that Portugal has complied with the euro zone’s fiscal rules.

The government has grown accustomed to beating international forecasts: the finance ministry drily noted this week that the European Commission had been “gradually catching up with reality” as it adjusted its deficit projections steadily downwards in 2016. The economy has grown for 13 quarters, expanding at an annualised rate of 2% in the fourth quarter of last year. The left-wing pact that opponents expected to unravel within a year has endured, and polls put the Socialists ten percentage points ahead of the Social Democrats, a position of which Europe’s other centre-left leaders can only dream. “Mr Costa has certainly defied expectations,” says Antonio Barroso of Teneo Intelligence, a risk consultancy. Mário Centeno, the finance minister, wants the EU to free Portugal from its excessive-deficit procedure, a disciplinary mechanism used to enforce the euro area’s fiscal rules. “Portugal would then join the club of successful ‘turnaround’ stories in the euro zone’s periphery, alongside Ireland and Spain,” says Federico Santi of the Eurasia Group, another consulting firm. The ultimate prize would be an investment-grade credit rating. Every rating agency apart from DBRS, a small Canadian firm, has classed Portugal’s sovereign debt as junk since the beginning of the country’s bail-out programme, which lasted from 2011 to 2014. Mr Centeno thinks their failure to recognise the strength of the recovery amounts to unfair treatment and burdens the government with high borrowing costs. Interest rates, he complains, absorb more of Portugal’s budget than of any other EU country’s. Rating upgrades, however, may not be imminent. The European Commission warned this week that Portugal’s banks remain fragile. The government plans to inject €2.5bn ($2.7bn) to recapitalise state-owned Caixa Geral de Depósitos, the country’s largest bank, which could increase this year’s budget deficit. The sale of Novo Banco, the lender salvaged from the collapse of Banco Espírito Santo in 2014, is expected to be concluded shortly, but may also entail additional state liabilities. Mr Costa blames the EU and the IMF for failing to provide enough aid to the financial sector during the bail-out, leaving his government, which has spent €4.4bn on bank rescues, to clear up the mess. But economists also remain concerned about public debt, which inched up to 131% of GDP last year despite the shrinking deficit.

“The country’s high debt levels remain the elephant in the room,” says Mr Barroso. Should the euro zone face a shock, such as Marine Le Pen winning France’s presidential election, Portugal is the country most likely to face a debt crisis, he thinks. The Portuguese tout the shrinking deficit as proof that their Keynesian approach to growth works. But until Mr Costa shows that he can repeat last year’s budget success, many will remain sceptical. “Supporting domestic demand through a slightly looser fiscal policy may have paid off,” says Mr Santi, “but it is no substitute for the structural reforms Portugal still needs.”