The Portuguese government could soon end 25 consecutive years of budget deficits — a historic moment for the indebted economy.
Portugal has been in financial trouble since the sovereign debt crisis of 2011. Several years of economic mismanagement led to very high debt levels and raised market fears that the country would not be able to repay its loans. The difficulties in getting money from the market forced Portugal to ask for financial assistance that same year.
But four years after ending a bailout program, the Portuguese government is now forecasting a budget surplus — when state expenditure is lower than revenues. According to the Finance Ministry, there will be a surplus of 0.25 percent of gross domestic product (GDP) in 2020 — a year ahead of schedule.
This is, according to the European statistics office Eurostat, an accomplishment that the southern European nation has never managed since records began in 1995. Eurostat will confirm the final 2017 figures in late April.
Analysts claim the Portuguese projections are "realistic" for 2020 as Lisbon has managed to reduce its deficit over the last few years. But cautioned against potential risks.
"Portugal shows today its best economic and financial performance in several decades," Finance Minister Mario Centeno said in late March, when presenting the current state of the country's finances.
"The upgrade of Portugal's credit rating by S&P and Fitch, combined with the already-large reduction in Portugal's budget deficit and its exit from the EU's fiscal watchlist, are reducing Portugal's borrowing costs and interest payments, and this will help it reach its budget target sooner," Ben Robinson, senior economist at the think tank OMFIF (Official Monetary and Financial Institutions Forum), told CNBC in an email.
Data from the Portuguese Finance Ministry showed that the country paid less than 300 million euros ($368.49 million) in interest on its sovereign debt between 2016 and 2017 due to the increasingly optimistic views from the ratings agencies.
Fitch and S&P joined DBRS at the end of 2017 in giving Portugal's debt an "investment grade" after years of considering it "junk." They recognized that after the bailout program, which ended in 2014, the economy has recovered and is set to continue growing over the coming years. The employment rate has improved as well as its debt levels, the credit rating agencies said at the time.
Portugal's structural deficit — which does not include one-off hits — is expected to be 1 percent of GDP in 2017, according to the latest government figures. In 2016, this had been 1.8 percent of GDP.
Such an improvement has made investors more confident on Portugal's ability to repay its debts.
"The strong improvement of the budget balance in 2017 was to a large extent the result of the improving economic environment," Maartje Wijffelaars, an economist at Rabobank, told CNBC via email.
Such improvement, she said, "has led to higher social contributions and tax revenues and lower spending on unemployment benefits for example."
Portugal grew 2.7 percent in 2017, according to data from the Finance Ministry. The positive momentum across the euro zone boosted confidence among the Portuguese. However, employment growth — it rose 3.2 percent in 2017, high foreign investment in the real estate market and strong tourism figures have also led to a strong domestic demand.
"Centeno and his government should get credit," Wijffelaars said about the way Portugal has managed to keep a cap on the increase in public sector pay.
"The improvements in Portugal's general budget balance have been rather remarkable," she said. "Going forward it's important that the government does more to also improve the structural budget balance. It can't depend on everlasting strong economic growth to improve its fiscal balance."
The Portuguese economy has improved but analysts believe there are still several risks that cannot be excluded.
"Structural reform has been quite slow," Robinson from OMFIF told CNBC, in reference to the past few years following the end of the bailout and when the ruling socialist party took office.
When compared with the rest of the euro zone, Portugal still has one of the highest levels of non-performing loans in its banking sector. This ratio stood at 14.6 percent in the third quarter of 2017; from 17.7 percent in the same period of 2016.
The banking system is still calling for further action. Novo Banco, the bank that was built with the good assets of the collapsed Banco Espirito Santo, reported a net loss of 1.4 billion euros for 2017 — nearly doubling its loss registered in 2016.
As a result, the bank will need further capital, part of which will come from a government loan — meaning that taxpayers' money will be used once again to support the banking system.
At the same time, Robinson warned that the European Central Bank is slightly reducing its bond purchases, which could mean higher borrowing costs for euro zone countries in the future.
Though "the ECB has been under-purchasing Portuguese bonds," he said, "it is likely to be relatively less badly-affected by the end of quantitative easing than others, such as Italy."
This is because the ECB faces a couple of restrictions when buying government bonds. For example, the central bank cannot hold more than a third of a country's outstanding debt.
With more sound public finances, "Portugal can once again face the future with optimism," Centeno said last month. He reassured that the country will continue following this path towards a better fiscal performance.