Iraq's parliament has approved a new government with Sunni and Kurdish deputy prime ministers, as it seeks to tackle Islamic State (IS) militants who have seized large parts of the country.
Saleh al-Mutlak and Hoshyar Zebari were approved under a power-sharing deal after weeks of political deadlock.
PM Haidar al-Abadi, a moderate Shia, was asked to form a government with the resignation of Nouri Maliki.
The US said the new government was a "major milestone" for Iraq.
US Secretary of State John Kerry praised the inclusive nature of the new government and said he would travel to the Middle East on Tuesday to help build "the broadest possible coalition of partners" to defeat IS.
Prime Minister Haidar al-Abadi has pledged to fill the posts of interior and defence minister within a week.
His predecessor Nouri al-Maliki was forced to resign in August, as the Sunni Arab and Kurdish communities accused his administration of pursuing sectarian policies.
'Last minute brinkmanship'
Many Sunni rebels were recruited to Islamic State's ranks as it seized large swathes of Iraq, capitalising on growing tension between the Sunni minority and the Shia-led government.
However, many have since indicated that they would be ready to turn against IS if Sunni rights were enshrined in a reformed political order in Baghdad.
There was a constitutional deadline for the new Iraqi government to be formed, and the haggling and brinkmanship had gone up to the last minute, the BBC's Jim Muir reports from Irbil.
Adel Abdul Mahdi from the Islamic Supreme Council of Iraq was appointed oil minister, while former PM Ibrahim Jaafari was named foreign minister.
Mr Maliki, another former prime minister, Ayad Allawi, and former parliamentary speaker Osama al-Nujaifi, were given the ceremonial positions of vice presidents.
'Stormy session': Jim Muir, BBC News, Irbil
It was a sometimes stormy session, with many deputies making angry interventions from the floor.
But in the end, Haidar al-Abadi won votes of confidence for his ministers, one by one.
While many key posts went to the majority Shia community, Sunnis and Kurds were also well represented.
The Americans in particular will be relieved to see the birth of what they hope will be an effective and inclusive new government that will pull the country together for a drive against the radicals of the Islamic State.
The Kurdish bloc said its participation was conditional on all outstanding issues between Baghdad and Kurdistan being resolved within three months, and on the government paying Kurdistan's budget allocation, which has been withheld for more than nine months, within one week.
On Monday, Iraqi government forces said they had cleared IS militants from a wide area around the strategic Haditha dam, helped by US air strikes.
Troops and militia also retook Barwana, east of Haditha, from IS fighters, who abandoned their weapons and vehicles while retreating, reports said.
Also on Monday, IS fighters attacked a riverside town north of Baghdad, killing at least 16 people and wounding 30 others.
US President Barack Obama will on Wednesday reveal his strategy to combat IS, which has announced the creation of a "caliphate", or Islamic state, in the large swathes of Iraq and Syria under its control.
The secretary general of the Arab League meanwhile urged its members to confront Islamic State on all possible levels.
What was required from member states was a "clear and firm decision for a comprehensive confrontation" with "cancerous and terrorist" groups, Nabil al-Arabi told a meeting of foreign ministers in Cairo.