1 of 6
The Associated Press
People pass by the damaged Bab al-Tob police station in central Mosul, 225 miles (360 kilometers) northwest of Baghdad, Iraq, Tuesday, July 15, 2014. The panic that initially gripped Iraq after Sunni militants led by the Islamic State extremist group seized the country's second-largest city, Mosul, and swept across northern and western Iraq has largely subsided. After appearing on the verge of collapse, Iraq's security forces have stiffened while the insurgent offensive has eased, which has helped stabilize the front lines. (AP Photo)

BAGHDAD — Iraqi lawmakers broke their deadlock Tuesday and elected a new speaker of parliament, taking the first step toward forming a new government that is widely seen as crucial to confronting militants who have overrun much of the country.

Still, it was not clear whether lawmakers had reached a larger deal that would also include an agreement on the most contentious decision — the choice for prime minister. The incumbent, Nouri al-Maliki, has ruled the country since 2006, but is under intense pressure to step aside. So far, he has insisted on staying for a third term.

After voting behind closed doors, the legislature tallied the results on a whiteboard wheeled into the hall that showed Sunni lawmaker Salim al-Jubouri winning with 194 votes out of 273 cast in the 328-seat parliament. A second candidate, Shorooq al-Abayachi, received 19 votes. There were 60 abstentions.

"Today's step demonstrates the country's democracy and national unity," said Shiite lawmaker Abbas al-Bayati, putting a decidedly positive spin on a vote that was delayed twice. "We have now a legislative body that can do its job in building democracy."

Lawmakers broke into applause after al-Jubouri passed the 165-vote threshold needed to win the post, before the proceedings turned to electing two deputy speakers — one Shiite and one Kurd.

According to the constitution, parliament now has 30 days to elect a president, who will then have 15 days to ask the leader of the largest bloc in the legislature to form a government. Then a prime minister will be picked.

Under an informal agreement that took hold after the 2003 U.S.-led invasion, the speaker's chair goes to a Sunni, the presidency to a Kurd and the prime minister's post to a Shiite.

The inability of al-Maliki's government to prevent the militant offensive over the past month has deeply shaken confidence, both at home and abroad, in his ability to hold Iraq together. His opponents — and even many of his former allies — accuse him of trying to monopolize power and alienating the Sunni minority.

Al-Maliki has so far refused to withdraw his candidacy, and insists he has a mandate because his bloc won the most seats in April elections.

Despite al-Jubouri's election, signs quickly emerged that any agreement on a president, prime minister and eventually a new Cabinet may still take some time.

Al-Bayati, the State of Law coalition legislator, said the Shiite bloc's support for al-Jubouri Tuesday was predicated upon reciprocal support for al-Maliki's prime minister bid.

"There is an ethical and political agreement with the blocs to whom we gave our vote today to support their candidate for the post of parliament speaker, and to vote for our candidate for the post of prime minister: al-Maliki" al-Bayati said.

Sunni lawmaker Mohammed Ikbal, a member of al-Jubouri's bloc, denied there was any such deal.

"We do not support a third term (for al-Maliki) because of the wrong policies in the country and the deterioration in the security situation," Ikbal told The Associated Press. "We support any other candidate from the National Alliance."

Perhaps just as important were the divisions that emerged within the National Alliance, the umbrella group for Shiite parties, during the vote for the first deputy speaker.

According to lawmakers, there was an agreement between all of the alliance's blocs to present the State of Law's Haider al-Ibadi as the Shiite nominee for deputy speaker. But at the last minute, a second Shiite candidate, Ahmed Chalabi, was also nominated for the post.

When it came time to cast ballots, al-Ibadi and Chalabi nearly split the vote, forcing lawmakers to cast their ballots again. Chalabi, a secular Shiite and one-time Washington favorite widely disliked by Iraq's Sunnis, eventually withdrew his candidacy to bring an end to the challenge.

But the dispute pointed to the deep divisions within the National Alliance, and suggested that Shiite parties are still far from settling on a common candidate for the crucial post of prime minister.

The panic that initially gripped Iraq after Sunni militants led by the Islamic State extremist group seized the country's second-largest city, Mosul, and swept across northern and western Iraq has largely subsided. After appearing on the verge of collapse, Iraq's security forces have stiffened while the insurgent offensive has eased, leading to relative stabilization on the front lines.

Clashes and attacks still take place daily in the main conflict zones, including Tuesday in two towns located in a Sunni belt that runs just south of the capital.

Two bombs in quick succession killed at least nine people in the town of Madain, some 20 kilometers (15 miles) southeast of Baghdad, officials said.

The first roadside bomb targeted a military convoy as it traveled through the town at dawn, a policeman said. A second explosion then struck as pro-government militia members rushed to the scene to help those hit by the first blast.

The police official said five militiamen and four soldiers were killed, while seven others were wounded. A medical official confirmed the figures.

Another roadside bomb killed four soldiers, including two officers, during a patrol in the town of Youssifiyah, located 20 kilometers (15 miles) south of the capital, a police officer said. Four other soldiers were wounded in the attack, he added.

A medical official confirmed the casualty figures. All officials spoke on condition of anonymity as they were not authorized to release information.

Associated Press writers Ryan Lucas and Murtada Faraj contributed to this report