BAGHDAD- Iraq's Supreme Court has ratified the results of the May 12 parliamentary election, its spokesman said on Sunday, setting in motion a 90-day constitutional deadline for the winning parties to form a government.

Parliament in June ordered a nationwide manual recount of the results, which were tallied electronically, after a government report said there were widespread violations and blamed the electoral commission.

Yet the recount showed little had changed from the initial results as populist Shi'ite Muslim cleric Moqtada al-Sadr retained his lead, positioning him to play a central role in forming the country's next government.

"The Federal Supreme Court issued on the afternoon of Aug. 19, 2018, its decision to ratify the names received," its spokesman Iyas al-Samouk said in a statement.

The ratification makes the results formal and lawmakers now have to gather and elect a speaker, then president and finally a prime minister and cabinet within 90 days. 

The political uncertainty over the make-up of the new government has raised tensions at a time when public impatience is growing over poor basic services, unemployment and the slow pace of rebuilding after a three-year war with the Islamic State militant group.

Prime Minister Haider al-Abadi's government, now serving in a caretaker capacity, welcomed the court's announcement.

"The government welcomes the decision by Iraq's Federal Supreme Court to certify the results of the May 12 parliamentary election. This milestone paves the way for the convening of the first session of the new parliament, and subsequently the formation of the new government," it said in a statement.

(Reporting by Ahmed Aboulenein Editing by David Goodman/Mark Heinrich) ((ahmed.aboulenein@tr.com; +964 790 191 7021; Reuters Messaging: ahmed.aboulenein.thomsonreuters.com@reuters.net))