Mohammed al-Halbousi, 37, is chosen as speaker by Iraqi legislators in first step towards formation of government.

Iraqi legislators have elected a speaker of parliament, paving the way for the formation of a new government after months of uncertainty in the wake of an inconclusive election.

Mohammed al-Halbousi, a Sunni politician and the former governor of Anbar province, won 169 votes in a secret ballot conducted at Saturday’s session of the 329-seat assembly, according to reports.

Aged 37, he will be the youngest speaker of parliament in Iraq’s history.

The vote came nearly two weeks after the newly elected assembly’s first meeting, during which legislators failed to pick a speaker and two deputies as they were unable to determine which competing bloc had the most parliamentary seats.

By custom, Iraq’s parliamentary speaker is a Sunni, the prime minister is a Shia and the president a Kurd.

‘A lot can change’

Iraq has been in political limbo since the May 12 ballot, which was marred by allegations of fraud and a low turnout.

After a vote recount was completed in August, the bloc led by populist Shia leader Muqtada al-Sadr retained its lead with 54 seats. The Iran-affiliated Fateh alliance, which is led by Hadi al-Ameri, came in second with 48 seats, while incumbent Prime Minister Haider al-Abadi‘s bloc remained in third place, with 42 seats.

Before the parliament’s September 3 meeting, al-Sadr and al-Abadi formed an alliance and claimed they had a majority of the seats. However, this was contested by former Prime Minister Nouri al-Maliki, who allied with Ameri.

A coalition government needs a majority of parliamentary seats – at least 165. The bloc with the most members appoints the prime minister and presides over the formation of the next government.

The result of Saturday’s vote indicated that the pro-Iran bloc led by Ameri looked positioned to take the lead after the election of Halbusi, whom it backed.

Al Jazeera’s Rob Matheson, reporting from Iraq’s capital, Baghdad, said “Halbusi has received strong support from the Shia contingent within the parliament” but added that “there’s a lot that can change” over the next few days.

“Everyone is going to be watching very carefully about how the government is gradually going to form, and we’ll have a far clearer picture by the end of this week,” added Matheson.

Halbusi’s two deputies were expected to be chosen later on Saturday.