The revised law is seen as vital to the process of democratising Iraq
The Iraqi parliament has approved a crucial election law ahead of national polls due in January 2010.
The reform was passed by a wide margin after weeks of deadlock, which had raised fears that the parliamentary election might have to be delayed.
There have been concerns that such a postponement could undo recent progress towards greater stability.
US President Barack Obama hailed the MPs' vote as a "milestone" as Iraqis take responsibility for their future.
"I want to congratulate Iraq's leaders for reaching this agreement," he added.
Sebastian Usher, BBC regional analyst
The key sticking point was the northern city of Kirkuk. The city is in a region that sits on vast oil reserves.
Its population is divided between Kurds and Arabs, with both vying for control. The Kurds wanted its electoral roll modified to show them as the majority
In the end, the electoral law was a compromise that left a final decision over Kirkuk for later.
"The United States will continue to stand with Iraq as a strong partner and as a friend."
January's election is seen as crucial to strengthening Iraqi democracy.
Correspondents say it could affect US plans for a pullout.
The electoral law - which has to be in place at least 90 days before voting - was approved by 141 of 196 lawmakers present.
The emotional session was broadcast live on national television.
The parliamentary vote had been delayed 10 times over several weeks.
The country's factions were deadlocked on a range of issues including: the distribution of seats in the ethnically divided, oil-rich city of Kirkuk; and how candidates are to be listed on ballot papers.
It was not immediately clear whether the elections would go forward on the scheduled date of 16 January.
2003: US appoints Governing Council
2004: Governing Council elects interim government
Aug 2004: National conference elects interim national assembly
Jan 2005: First general elections for transitional national assembly and provincial councils
Dec 2005: General elections for first full-term government and parliament
Jan 2009: Polls for provincial councils - key test of security gains
The MPs decided on Sunday that in Kirkuk - and other provinces where there is dispute over electoral rolls because of the ethnic mix of the area - the results would be provisional.
They also decided that electoral lists printed on ballot papers would include names of politicians standing for office - as opposed to showing only anonymous party blocks.
The UN had warned it could not guarantee to endorse the poll if the reform bill was not passed.
There have been a number of deadly attacks across Iraq in recent weeks.
Observers say violence may intensify as militant groups attempt to destabilise Iraq in the run-up to the election.