Panama raised $3.1 billion on Thursday in its biggest-ever sale in the international bond market, a source familiar with the deal told LatinFinance.

The sovereign sold $1.1 billion worth of seven-year bonds, $1.25 billion of 13.5-year notes and $750 million of 33-year notes, the source said.

Panama priced the 2031 bonds at par to yield 7.5% after opening the initial price talk earlier in the day around 8%. It also priced the 2038 notes at par to yield 8% after opening the deal in the mid-8% area, according to the source.

The 2057 notes carried a coupon of 7.875% and priced at 95.769 to yield 8.25% after initial price talk in the high-8% area, the source added.

Citi and Goldman Sachs were joint bookrunners on the bond sale.

The Panamanian government plans to use the proceeds to fund spending under the budget this year, according to a prospectus filed with US Securities and Exchange Commission.

Moody’s downgraded the Central American nation to Baa3 from Baa2 in October last year, saying the government was failing to rise adequately to growing fiscal challenges.

Panama previously raised $1.8 billion in a two-part bond sale in March last year and $1.4 billion in another two-part deal in September.