(Bloomberg) -- El Salvador’s Bitcoin-touting President Nayib Bukele said the nation fully repaid a maturing foreign bond, staving off default after securing a last-minute loan and buying back millions of dollars of its own debt.

Bukele on Tuesday announced payment of principal and interest on $800 million of the Central American nation’s dollar bonds maturing Jan. 24. El Salvador had already bought back a portion of the debt, leaving just $604 million of bonds to mature on Tuesday. 

Read: Investors Watch Bukele’s Twitter as El Salvador Bond Matures

Analysts and investors had grown increasingly optimistic that the nation would avert default in January. El Salvador locked in a $450 million loan from a multilateral lender, the Central American Bank for Economic Integration, and carried out two debt repurchases in recent months.

That helped trigger a comeback in its beleaguered foreign bonds, which rallied an average of 24% this month as the maturity date approached, according to data compiled by Bloomberg.

After a successful payment, “we would expect the curve to rally somewhat,” especially the bonds due in 2025 and 2027, said Nathalie Marshik, a managing director for Latin America fixed income at BNP Paribas. “The rally should be limited, though, because the payment is expected by the market and priced in.”

Even so, investor concern lingers regarding El Salvador’s bonds due to the symbolic firing of several top judges, the lack of a deal with the International Monetary Fund and the nation’s risky bets on Bitcoin. Bukele’s administration had purchased 2,381 Bitcoin through June 2022, according to his announcements on Twitter. On Nov. 16, he said the government would buy one Bitcoin every day.

Plus, the 41-year-old leader is gearing up for a controversial re-election bid in 2024.

“While this is a positive event, long term risks remain,” said Citigroup Global Markets Inc. strategists including Esteban Tamayo.

“We expect a return to low growth this year for El Salvador that will likely make it difficult for the country to sustain a primary surplus large enough to avoid a future restructuring without new revenue from reforms or higher fiscal restraint,” the Citi strategists wrote in a note. “Neither of these is likely to take place, as 2024 elections are upcoming, adding pressure on President Bukele to keep his public approval high.”

Barclays strategists Sebastian Vargas and Nestor Rodriguez said they expect the nation’s reserves to drop to $1.5 billion by the end of the year, with further access to external financing sources limited. 

Investors still demand an extra 14 percentage points of yield to hold El Salvador’s dollar debt rather than US Treasuries, according to JPMorgan Chase & Co. data, well above the threshold for debt to be considered distressed.

The nation still has about $6.4 billion of foreign bonds outstanding after the 2023 maturity, with the next major principal payment due in 2025, according to data compiled by Bloomberg. El Salvador already bought back a portion of those notes, leaving just $348 million due on Jan. 30, 2025. The debt hovered just below 73 cents as of 11:30 a.m. in New York.

“With the largest payment out of the way, now El Salvador can fully exploit the gap created by its previous buybacks,” said Santiago Resico, a strategist at TPCG. “The administration can now bide its time to prepare for both the 2025 and 2027 sinkings, having several years to accumulate primary surpluses to face its obligations in the medium run.”

--With assistance from Michael McDonald and Esteban Duarte.

(Updates with Bitcoin details in sixth paragraph and additional comments beginning in eighth paragraph.)

©2023 Bloomberg L.P.