Costa Rica is a standout in turbulent Central America: decades of democracy and political calm have paid dividends with high prosperity, an enviable welfare state and generous public sector wages.

But Covid-19 has brought a reckoning. As the economy contracted 4.5 per cent last year and the important tourism sector slumped 40 per cent, a debt burden approaching 70 per cent of gross domestic product proved unsustainable, forcing President Carlos Alvarado to deliver long overdue reforms and go cap-in-hand to the IMF for a $1.8bn loan.

Alvarado told the Financial Times he has the votes in Congress to pass a bill to rein in the public sector wage bill within weeks. “There is a sense of necessity,” he said. “It is urgent to have this approved”.

He believes a deal on restructuring a public sector wage bill in which more than 2,000 people earn more than the president will pave the way for Congressional agreement on the IMF loan.

There have been street protests against both the IMF deal and the wage bill, which has had a choppy ride in Congress, where Alvarado holds less than a fifth of the seats. But as he approaches his last year in office, he sees dealing with the debt issue as one of his main legacies.

“At a time of so much populism, I’m on the opposite side of the spectrum, doing what’s right, not what’s populist,” said Alvarado in a video interview from San José. Costa Rica holds presidential elections in February.

Despite its debt problems, Costa Rica boasts of an unlikely feat: record job creation, rising exports and major foreign investments last year, despite Covid-19.

“During the pandemic, what are the odds of foreign investment coming to Costa Rica or increasing operations or hiring new people? It's counter-intuitive to think that operations will grow in a context like that,” Alvarado said.

“We need stability even though it sometimes sounds boring — in the long-term it’s way, way better. Stability means peace, stability means jobs, stability means certainty, stability means growth.”

Although peaceful Costa Rica has been a nearshoring destination for more than two decades, it has the turbulent Trump years to thank for helping boost its investment credentials during the pandemic.

“What has been going on in relations in the past years between the US and China . . . has a lot to do [with investment dynamics],” he said. “Some of the value chains that were positioned in Asia are looking back again to the Americas. It’s one of the key drivers.”

Top of that list is Intel. The US tech company picked Costa Rica as a hub in 1997 and within a few years, microchips made up 36 per cent of the country’s total exports.

FDI flows fell 37.8 per cent during 2020

But in 2014, amid a downturn in the personal computer market, Intel relocated chip manufacturing to China, Malaysia and Vietnam, shedding 1,500 jobs and wiping out a quarter of Costa Rica’s foreign sales at a stroke.

Now, Intel has U-turned on that decision, announcing last December it was bringing manufacturing back to Costa Rica, where it had anyway retained a research and development centre.

Alvarado reeled off a list of other big companies which had made substantial investments in Costa Rica in 2020 and 2021, including tech provider Amazon Web Services, life sciences group MicroVention, electronics manufacturer Philips, pharmaceuticals group AstraZeneca and healthcare company Viatris.

Costa Rica net employment

Still, in dollar terms, Costa Rica’s foreign direct investment tumbled 38 per cent last year. Jorge Sequeira, head of investment promotion agency Cinde, argued that job creation — which increased 12 per cent in 2020 — was a more relevant metric now that much of the economy has shifted from manufacturing to services.

“Last year, in the middle of the pandemic, we created nearly 20,000 new jobs in multinational corporations. We believe that number can be higher this year, maybe even significantly higher,” he said. “We’re very bullish in terms of this continuing.”

Costa Rica generates 99 per cent of its electricity from clean fuels — making it easy for a multinational to meet ambitious US or European green goals by locating in Costa Rica.

“If you want to say your production is 100 per cent renewable, the place to come is Costa Rica,” said Alvarado. “We are not only dreaming big, we are acting big.”

Those ambitions extend to education and human capital with Scandinavian-style English teaching goals. “In the next two decades, everyone coming out of public education will be bilingual. That’s a competitive advantage,” Alvarado said, speaking himself in fluent English.

Costa Rica’s economy was close to crisis in late 2018 after its bonds and currency crashed and there were weeks of protests last year against tax increases and the IMF deal. Powerful unions remain opposed to the revamp of public sector pay.

But Alvarado is confident his country can rein in a 2020 fiscal deficit of nearly 9 per cent and a debt burden set to peak at 76 per cent of GDP in 2023.

“We’re sending the right signals to the market that we’re being serious about this,” he said. “What we will be guaranteeing at the end of the day is having the fiscal space and the stability for this and the next generation.”

But even for Costa Rica, whose political tranquillity is the envy of its neighbours, that cannot be taken for granted. “Stability is not carved in stone,” he said. “You have to be constantly nurturing it.”