Iraqi MPs have approved new defence and interior ministers, completing a unity government that is battling the spread of Islamic State militants.
Mohammed Salem al-Ghabban, a Shia, was appointed interior minister, while Khaled al-Obeidi, a Sunni, was confirmed as defence minister.
IS controls large parts of the country, and has been making gains despite US-led coalition air strikes.
On Friday, a curfew was imposed in the city of Ramadi amid fierce fighting.
The vote by Iraqi MPs will be a big relief both inside and outside Iraq after weeks of wrangling, says BBC Arab affairs editor Sebastian Usher.
A more inclusive cabinet is seen as an essential first step in countering IS fighters, particularly among Iraq’s Sunni minority, our correspondent adds.
Analysis: Sebastian Usher, BBC Arab affairs editor
It’s taken more than a month for these two key posts to be agreed. In a country where
more than 1,000 people were dying in violence every month even before the rise of IS militants, the interior and defence jobs were always going to be highly sensitive and
difficult to fill.
The appointment of Mohammed Salem al-Ghabban as interior minister is something of a compromise after the powerful Shia party he belongs to, the Badr Organisation, conceded that their preferred candidate, the party’s leader, would not be acceptable to Sunni parties.
As for the man taking over at the defence ministry, Khaled al-Obeidi, his appointment has
clear symbolic significance as he is a leading Sunni politician from the city of Mosul that
was the first to be overrun by IS.
So, Mr Abadi has succeeded in fulfilling the first part of his herculean task – to assemble a government that looks and feels more inclusive.
His backers inside and outside Iraq are hoping it will create a sense of unity at the top that will provide an effective political response to the huge and complex challenge posed by IS.
Prime Minister Haidar al-Abadi had pledged to fill the posts in September, but his previous nominations were rejected.
The previous Prime Minister Nouri al-Maliki was forced to resign in August, as the Sunni Arab and Kurdish communities accused his administration of pursuing sectarian policies.
A new unity government was sworn in on 8 September, headed by Mr Abadi, with Sunni and Kurdish deputy prime ministers.
Iraqi government forces, supported by US-led air strikes, are currently battling IS militants near Ramadi, the capital of Anbar province, as well as the city of Tikrit, which was seized by IS earlier this year.
Anbar is a strategically important province, and home to Iraq’s second-largest dam, the Haditha dam.
Seizing Anbar would enable IS to to establish a supply line and potentially launch attacks
on the Iraqi capital, Baghdad.
On Thursday, officials said more than 40 people were killed and dozens wounded in a
series of attacks in mainly Shia areas of Baghdad.
The capital was rocked by further attacks on Friday night, as a series of car bombs killed
at least 23 people.
Meanwhile, US military officials said in a statement that they had conducted 10 air strikes against IS targets in Iraq, and 15 air strikes against IS targets in Syria, on Friday and Saturday.
IS buildings, oil facilities and armed vehicles were among the targets destroyed, the statement added.
In other government appointments on Saturday, former foreign minister Hoshyar Zebari
was appointed finance minister.
He is among six Kurds to be given cabinet posts, double the number they were originally offered.
Adel Fahd al-Shirshab was made tourism minister, while Bayan Nouri was named minister
for women’s affairs.