Masoum, 76, one of the founders of the Patriotic Union of Kurdistan party led by the previous president, Jalal Talabani, accepted the position after winning two-thirds of the votes, noting the "huge security, political and economic tasks" facing the government.
Last month's rapid advance of the Islamic State extremist group, which captured Iraq's second largest city of Mosul, has plunged the country into its worst crisis since the withdrawal of U.S. troops in 2011 and inflamed already-existing tensions between sectarian and political rivals.
Hours before Masoum was elected, militants fired mortar shells at army bases where detainees facing terrorism charges were being held in Taji, some 20 kilometers north of the capital. Fearing a jailbreak, authorities evacuated the facilities, officials said.
But as the prisoners were being bussed through a remote area nearby militants attacked again, this time 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.
It was not immediately clear if the prisoners were killed by soldiers or militants, or if the Islamic State group was involved.
Islamic State militants have staged several jailbreaks, including a complex, military-style assault on two Baghdad-area prisons in July 2013 that freed more than 500 inmates.
The vote for president -- a largely ceremonial post previously held by ailing Kurdish leader Talabani - is widely viewed as a step toward achieving consensus among political rivals, seen as necessary for tackling the deteriorating security crisis.
Masoum is considered a soft-spoken moderate, known for keeping good relations with Sunni and Shiite Arab politicians.
He was born in what is now the Kurdish regional capital of Irbil in 1938. He entered politics when he was 16 years old, taking part in Kurdish-organized demonstrations. He joined 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 Kurdish politicians, including Talabani.
The next step in Iraq's political transition will be for Masoum, who has already officially assumed the title of president, to select a candidate for prime minister to try to form a new government.
Prime Minister Nouri al-Maliki's bloc won the most seats in April elections, but he 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.
UN chief Ban Ki-moon arrived in Baghdad earlier Thursday, urging lawmakers to "find a common ground" so they can address the crisis sparked by the rapid advance of the Islamic State extremist group and allied Sunni militants across much of northern and western Iraq last month.
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."
Under an unofficial agreement dating back to the 2003 US-led invasion, the presidency is held by a Kurd while the prime minister is Shiite and the parliament speaker is Sunni.
Speaking alongside the UN secretary-general, 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," al-Maliki said.
More than a million Iraqis have been displaced this year, many of them fleeing the latest wave of violence, according to the UN
Ban strongly condemned the persecution of religious and ethnic minority groups by jihadi militants in Mosul and elsewhere in Iraq, and offered continued UN support to the refugees fleeing the violence.
Kurdish politician Fouad Masoum elected as Iraqi president
Asia
Turkish President says the South Caucasus issue can come up on the agenda at any time
Erdogan calls for barrier-free NATO defense cooperation
US leader believes he could be the victim of an assassination attempt by Iran
Trump is confident that all NATO countries will soon increase defense spending to 5% of GDP
NEWS FEED
Turkish President says the South Caucasus issue can come up on the agenda at any time
Erdogan calls for barrier-free NATO defense cooperation
US leader believes he could be the victim of an assassination attempt by Iran
Trump is confident that all NATO countries will soon increase defense spending to 5% of GDP
Trump says Iran's new leadership "may be gone," after breakdown in peace negotiations
Türkiye, UK set to sign major defense partnership at NATO summit
Putin holds meeting on fuel crisis after Ukraine’s drone attacks
Russia bans diesel exports after Ukraine’s refinery attacks
Media: Iran announces suspension of talks with the US on final agreement
Turkmen President receives delegation led by Mikayil Jabbarov
Trump does not rule out closing Ukraine's airspace by the US
40 people readmitted to Azerbaijan last month
Interior Ministry conducts operation against "Any Unboxing" fraud pyramid created by Malaysian citizens - VIDEO
Iran: Acknowledgment of cancellation of US-Iran memorandum fuels regional tensions
Trump says he will speak with Putin today
Rutte: NATO to provide at least EUR 70 billion in military aid to Ukraine next year
Trump: Iran can be prevented from obtaining nuclear weapons even without an agreement
Trump: Ukraine's strikes deep inside Russia could help end the war
Trump says he will let Ukraine make Patriot Missiles
NATO: Iran must never possess nuclear weapons, ensure free passage through Strait of Hormuz
Trump told NATO leaders he wants to keep US in alliance, source says
Trump: We could launch very heavy strikes on Iran tonight
Russia tightens requirements for migrant workers: They will have to pay income tax
EU discussing ways to support regional connectivity with Armenia and Azerbaijan, Grono says
NATO to allocate EUR 70 billion to Ukraine this year
NATO adopts Ankara Declaration
Georgian Parliament Speaker criticizes Hague Declaration on Georgia
Azerbaijan, Uzbekistan discuss expanding religious cooperation
Four seriously wounded in shooting at Bavarian high school, suspect arrested
Ukrainian Air Force downs Russian war aircraft
Chevron tanker used for CPC oil hit by drone in Black Sea
bp and its co-venturers spend over $115 million on social projects in Azerbaijan
Azerbaijani ambassador meets First Deputy Speaker of Russia's Federation Council
Co-chair of Azerbaijan-Czech Joint Commission changed
Composition of Azerbaijan-Algeria Joint Commission approved
Migrant children to be required to leave Russia after turning 18
Amendments made to the Charter of the Icherisheher State Historical-Architectural Reserve
Damage or destruction of monuments in Shusha prohibited
President Ilham Aliyev awards diplomatic ranks to Azerbaijani diplomats -ORDER
Azerbaijan resettles former IDPs in Shusha's Kichik Galadara village, families receive house keys - UPDATED
EU to hold talks with Gulf states on Strait of Hormuz security, Kallas says
Bayramov, Jordanian Deputy PM hold expanded meeting, sign cooperation agreements - PHOTO - UPDATED
Shahbazov: Green Energy Corridor project enters development phase
Erdogan urges NATO allies to lift defence industry restrictions at summit
Peskov: Russia taking maximum measures to protect global energy infrastructure
Tbilisi airport fully resumes operations
Operation against terrorists carried out in Pakistan, 11 security personnel killed
Erdoğan: Türkiye is trying to bring Putin to negotiating table with Ukraine
Pezeshkian criticizes US over World Cup hosting and foreign policy
Slovenia needs more time to meet NATO defense commitments, PM says