Creditor nations have agreed to a proposal from the US and Germany to slash Iraq's debts to them by 80%.
Iraq's debts would be phased out under the deal
Iraq, which has set 30 January for its elections, has said $120bn (£64.5bn) debts are hampering its reconstruction.
Discussions among negotiators from the 19-strong Paris Club group took place in Berlin on the sidelines of the G20 summit of rich and developing nations.
Iraq's debts will be cancelled in three stages - 30% immediately, another 30% in 2005 and 20% in 2008.
The deal, however, depends on Baghdad's successful completion of an International Monetary Fund economic programme.
Iraq owes about $38.9bn in debt and interest repayments to the Paris Club of creditor nations, which includes the US, Russia, Japan and European nations.
The agreement will see Iraq's debts to the Paris Club
countries fall to $7.8bn, the group's President Jean-Pierre Jouyet said.
The breakthrough came on Saturday in talks between German Finance Minister Hans Eichel and US Treasury Secretary John Snow.
A deal was hammered out into the early hours on Sunday but a final agreement was not reached until Russia gave its approval.
Iraq will still be left with foreign debts of about $80bn to other nations, including Saudi Arabia and Kuwait.
But Mr Jouyet said he hoped the Paris Club agreement could serve as a benchmark for relief deals with the other creditors.
The issue of Baghdad's debts has caused some transatlantic tension.
The US and the UK had called for almost all of the debt owed to the Paris Club to be written off.
They argued Iraq needed to get back on its feet and become economically viable.
Germany, Russia and France had said only half the debt should be written off.
France had long stated that, because Iraq is rich with oil resources, it should not receive more debt forgiveness than the world's poorest countries.
The agreement gives a favourable background to the Iraq reconstruction conference which begins in Egypt on Monday.