BAGHDAD (AP) - Iraqi lawmakers elected a veteran Kurdish politician on Thursday to replace long-serving Jalal Talabani as the country's new president in the latest step toward forming a new government. But a series of attacks killed dozens of people and Islamic militants destroyed a Muslim shrine traditionally said to be the burial place of the Prophet Jonah, underscoring the overwhelming challenges facing the divided nation.
The 76-year-old Fouad Massoum, one of the founders of the Patriotic Union of Kurdistan party led by the previous president, Talabani, accepted the position after winning two-thirds of the votes in parliament, noting the "huge security, political and economic tasks" facing the next government.
Iraq is facing its worst crisis since the 2011 withdrawal of U.S. troops amid the blitz offensive launched last month by al-Qaida breakaway Islamic State group, which captured large swaths of land in the country's west and north, including Iraq's second largest city, Mosul. The militants have also seized a huge chunk of territory straddling the Iraq-Syria border and declared a self-styled caliphate in the territory they control, imposing their harsh interpretation of Islamic law.
As Massoum was named president, the Islamic militants blew up a revered Muslim shrine in Mosul traditionally said to be the burial place of the Prophet Jonah, several residents of the city told The Associated Press.
The militants first ordered everyone out of the Mosque of the Prophet Younis, or Jonah, then blew it up, the residents said, speaking on condition of anonymity for fear for their own safety. Several nearby houses were also damaged by the blast, they said.
The mosque was built on an archaeological site dating back to 8th century BC and is said to be the burial place of the prophet, who in stories from both the Bible and Quran is swallowed by a whale. It was renovated in the 1990's under Iraq's late dictator Saddam Hussein and until the June militant blitz, remained a popular destination for religious pilgrims from around the world.
In Baghdad, a double car bombing ripped through the busy commercial district of Karradah as people gathered at dusk to break their daily fast for the holy month of Ramadan, killing 21 people and wounding 33 and sending smoke billowing over the city, police and hospital officials said, speaking on condition of anonymity because they were not authorized to talk to media.
Earlier in the day, militants fired mortar shells on an army base holding suspects facing terrorism charges in Taji, about 20 kilometers (12 miles) north of Baghdad. As the prisoners were being evacuated by bus to prevent a jailbreak, the militants attacked with roadside bombs, igniting a gunbattle that left 52 prisoners and eight soldiers dead, the officials said, adding that another eight soldiers and seven prisoners were wounded in the gunbattle.
It was not immediately clear if the prisoners were killed by soldiers or militants, or if the Islamic State group was involved. No one immediately claimed responsibility for the attack. In the past, militants have staged several jailbreaks in Iraq, including a complex, military-style assault on two Baghdad-area prisons in July 2013 that freed more than 500 inmates.
Iraq's large, U.S.-trained and equipped military has largely melted away in the face of the onslaught by the Islamic State group, sapping morale and public confidence in its ability to stem the tide, let alone claw back turf lost to the extremists.
The post of Iraq's president - previously held by the ailing Talabani - is largely symbolic but Thursday's election marked a step toward achieving consensus among political rivals, badly needed if Iraq is to tackle the unprecedented security crisis.
A native in what is now the regional Iraqi Kurdish capital of Irbil, Massoum entered politics when he was 16 years old, taking part in Kurdish-organized demonstrations and joining the Kurdistan Democratic Party in 1964.
From 1973 to 1975, he was the Cairo representative of Kurdish rebels battling the Arab-dominated government in Baghdad, then went on to establish the Patriotic Union of Kurdistan with six other Kurdish politicians, including Talabani.
Under an unofficial agreement dating back to the 2003 U.S.-led invasion, Iraq's presidency is held by a Kurd while the prime minister is Shiite and the parliament speaker is Sunni.
The next step in Iraq's political transition will be for Massoum to select a candidate for prime minister who will try to form a new government.
Incumbent Prime Minister Nouri al-Maliki's bloc won the most seats in April elections but has faced mounting pressure to step aside, with critics accusing him of monopolizing power and alienating the country's Sunni and Kurdish minorities, contributing to the latest unrest.
Al-Maliki has, however, vowed to remain in the post he has held since 2006.
U.N. chief Ban Ki-moon on a visit to Iraq on Thursday urged lawmakers to "find a common ground" so they can address the crisis sparked by the Islamic State, whose push has threatened to fracture Iraq.
At a press conference with al-Maliki, Ban said Iraq is facing an "existential threat," but one that could be overcome if it forms a "thoroughly inclusive government."
Al-Maliki said he is committed to quickly forming a government. "Despite the fact that we have problems ... we are moving at a confident pace to implement the mechanisms of the democratic work," he said.
Ban strongly condemned the persecution of religious and ethnic minority groups by the Islamic State and other extremists, and offered continued U.N. support to the refugees fleeing the violence.
Ban also met with Iraq's most revered and influential Shiite cleric, Grand Ayatollah Ali al-Sistani, in the southern city of Najaf.
"In this time of crisis, when we see the shocking treatment of minorities by the Islamic State," al-Sistani "continues to preach peace, love and unity among all" Iraqis, Ban said.
Associated Press writers Murtada Faraj, Sinan Salaheedin and Vivian Salama in Baghdad, Jan Olsen in Copenhagen, Denmark, and Edith M. Lederer at the United Nations contributed to this report.