Iraq's supreme court has ratified the results of the March election, officially ruling that Iyad Allawi's Iraqiyya party won by a narrow margin.
The ruling clears the way for further negotiations between parties trying to form a coalition government.
The election in March was inconclusive, with no party winning a clear majority in the 325-seat parliament.
Incumbent Prime Minster Nouri Maliki, head of the State of Law alliance, had demanded a partial recount of votes.
His party won 89 seats, two fewer than the Iraqiyya party, which had attracted the support of Iraq's minority Sunni population.
Whilst politicians grappled with the inconclusive election result, insurgents have launched a series of bomb and shooting attacks which have left hundreds dead.