Greece will buy back €31.9bn of its bonds from private investors at a third of their nominal price, in a move to lighten its crushing debt load and meet a key condition to receive vital rescue loans.
The Greek debt agency said it would pay banks, funds and other private bondholders roughly 33.8% of the bonds' face value.
That is still a highly attractive option, as the bonds have been trading well below face value since a major debt writedown in March.
Investors brave enough to have bought Greek debt just a few months ago now stand to make 200% gains.
The agreement will shave some €20bn off Greece's €340bn debt, which is now mostly held by its bailout creditors - European partners and the International Monetary Fund.
The yield on Greek 10-year bonds dropped to about 12.6% on Wednesday, its lowest since the March writeoff and a sign of greater investor confidence in the country's ability to manage its debt.
The Athens stock index fluctuated and was down 0.2% after the announcement.
The Greek government had no immediate comment on the result of the deal, saying it would await a meeting on Thursday of European finance ministers, who must sign off on the buyback.
Under the terms of the buyback, Greece would spend €11.3bn of its bailout funds on the bonds - more than the €10bn initially budgeted. The key question is whether bailout creditors will accept the extra outlay.
The successful buyback deal was a major requirement before Greece could be granted a long-delayed instalment of its international bailout funds.
Athens expects Thursday's meeting to approve payment of €34.4bn, most of which is earmarked to shore up the country's struggling banks.
That's why domestic lenders all decided to participate in the buyback, relinquishing the prospect of long-term gains on the bonds, for the certainty of a big capital injection in the next few days.
IMF chief Christine Lagarde told reporters in Colombia that she would leave it to the EU finance ministers to comment at length, but expressed satisfaction with the deal.
"For the moment I can only welcome the results that have been produced by the debt buyback," she said, before the official results were released.
Athens has depended on international rescue loans for the past two and a half years, after it admitted its budget deficit was more than three times the initial forecast and swiftly lost access global bond markets.
In exchange for the funds, the government repeatedly slashed incomes and raised taxes to tame the deficit, creating widespread public resentment.