Iraq's Supreme Court on Thursday upheld a law ordering a manual recount of votes from the country's May 12 parliamentary election.
Parliament first ordered the recount in June after allegations of electoral fraud.
But the country's elections commission appealed the order, calling it unconstitutional.
Now a judge has upheld the recount, ruling Parliament was within its constitutional rights.
Allegations of fraud stemmed from discrepancies in electric ballot-counting machines that Iraq had never used or tested before the election.
Also, in early June, a fire broke out at a warehouse where some of the ballots were stored. Iraq's prime minister said it was part of a plot to hurt Iraq's democratic process.
On Thursday, Iraqi cleric Muqtada al-Sadr — whose coalition won in the election — called for Iraqis to support the ruling and "show restraint and deference to the law."
There are roughly 11 million ballots to recount by hand, and the process could take weeks.