BAGHDAD (Reuters) - Iraq’s parliament passed a law on Wednesday ordering a nationwide manual recount of votes in the May 12 parliamentary election, lawmakers said, a day after the prime minister said there had been serious violations.

FILE PHOTO: Iraq's Independent High Electoral Commission employee closes a ballot box at a polling station during the parliamentary election in Baghdad, Iraq May 12, 2018. REUTERS/Abdullah Dhiaa al-Deen/File Photo

The move could hinder the delicate process of forming a new government, raising the prospect of further uncertainty in Iraq, and pits the government and parliament against the election commission, which is meant to be independent.

The election was won by a bloc led by nationalist cleric Moqtada al-Sadr, a long-time adversary of the United States who also opposes Iran’s sway in Iraq. Votes were counted using an electronic system that was meant to prevent fraud but is now being blamed for irregularities.

Prime Minister Haider al-Abadi, whose bloc came in third, said on Tuesday there were “dangerous” violations and that most of the blame lay with Iraq’s Independent High Elections Commission (IHEC), high ranking members of which he banned from travel without his permission.

Parliament on Wednesday voted for amendments to the election law which force the IHEC to conduct a manual recount, after it had initially declined to do so. It also suspended the commission’s leadership, which is to be replaced by nine judges.

IHEC’s local chiefs in each of Iraq’s provinces are also to be replaced by judges, all picked by Iraq’s Supreme Judicial Council, a text of the amendment showed.

“The Independent High Elections Commission shall commit to a manual recount in all voting centers in Iraq under the supervision of the Supreme Judicial Council and with the attendance of representatives from political groups and the United Nations,” the text of the amendment law read.

The amendment also canceled the results from overseas voting and those from displaced voters in the mainly Sunni Anbara, Salahudin, Diyala and Nineveh provinces.

It ruled out the use in future elections of electronic vote counting devices, blamed for many of the violations.

An IHEC spokesman declined to comment and said he was unauthorized to speak on this matter to the media.

Iraq’s highest judicial authority, the Supreme Judicial council, had said this week that the courts could not force the IHEC to conduct a manual recount because the law stipulated the use of electronic vote counting devices.

A spokesman for the council told Reuters on Wednesday that was no longer an issue now that parliament had amended the law.

The new electronic vote counting system was introduced by IHEC on the grounds that it could reduce fraud and speed up delivery of the results.

Abadi said the devices were not inspected for errors before their use and that there had been possible corruption in procuring them.

Baghdad awarded Korean company Miru Systems a $135 million contract for the system, which includes around 70,000 devices to be used across the country.

Several political groups had voiced opposition to the use of the devices before the election, but not Abadi, who approved their introduction and supported their use.