BAGHDAD, July 24 (Reuters) - Iraq's parliament elected senior Kurdish lawmaker Fouad Masoum as president on Thursday, a long-awaited step in creating a new government capable of countering a Sunni Muslim insurgency.
Iraq's politicians have been in deadlock over forming a new government since an election in April. The next step, choosing a prime minister, may prove far more difficult.
Shi'ite Prime Minister Nuri al-Maliki has ruled since the election in a caretaker capacity, defying demands from the Sunnis and Kurds that he step aside for a less divisive figure. Even some Shi'ites oppose his bid for a third term.
Critics say Maliki is a polarising figure who has stirred up sectarian tensions that have worsened since Sunni insurgents swept through north and west Iraq last month, seizing large swathes of territory and declaring a "caliphate".
A shooting and bombing attack on a bus near Baghdad killed 52 prisoners and nine policemen on Thursday, Ministry of Justice sources said, highlighting the need for political leaders to bury their differences and bring stability.
(Writing by Michael Georgy; Editing by Robin Pomeroy)