(Bloomberg) -- El Salvador’s credit rating was upgraded by S&P Global Ratings, which cited the government’s effort to rework its short-term, local debt obligations. 

S&P raised the Central American nation’s debt rating to B- from CCC+ on Tuesday, putting it six levels into junk and on par with Ecuador and Nigeria. The outlook is stable.

“The government’s recent program to gradually refinance its short-term debt with local banks will reduce rollover needs and mitigate the risk of a default over the next two years,” analysts led by Patricio Vimberg wrote.

Despite the upgrade, S&P warned that the government faces considerable risks as debt servicing remain high and financing alternatives are somewhat limited. 

Moody’s Investors Service rates El Salvador three levels lower at Caa3 with a stable outlook, while Fitch Ratings assigns it a CCC+ score, seven notches below investment grade. 

Read more: El Salvador Local Banks Send Debt Management Proposal to Govt

Under its debt refinancing plan, El Salvador is targeting around half of the $2.8 billion in short-term bills. The government repays in full every outstanding short-term bill at its maturity date and the next day issues a new debt obligation — at longer maturities —- that could be taken by the same bank. 

©2023 Bloomberg L.P.