US Secretary of State John Kerry has proclaimed that he is “absolutely confident” of victory over the Islamic State, even as the militants were completing the takeover of the Iraqi city of Ramadi.

The Islamic State advanced rapidly into Ramadi, the capital of Iraq’s largest province Anbar and 80 miles west of Baghdad, after launching an offensive last Thursday. Within 24 hours, they held Government buildings in the city, and on Sunday the last Iraqi forces withdrew from the Anbar Operations Command Headquarters as it was attacked by mortars.

The Government of Prime Minister Haidar al-Abadi responded by asking Shia militias to help Iraqi forces retake the city, which has been under threat since the Islamic State advanced across the mainly-Sunni Anbar Province in early 2014. The militants already hold the nearby city of Fallujah.

Travelling in Korea, Kerry said:

I am convinced that as the forces are redeployed and as the days flow in the weeks ahead that’s going to change, as overall [they] have been driven back….I am absolutely confident in the days ahead that will be reversed.

However, the Secretary of State admitted that the fight would be difficult in Anbar, saying Ramadi was a “target of opportunity”.

A tour of Ramadi after its fall to the Islamic State:

Iraqi forces fleeing on armored vehicles from Ramadi:

Meanwhile, humanitarian concerns rose as thousands of families fled on foot from Ramadi to areas such as Khalidiya, Habbaniya, and Amiriyat al-Fallujah. Activists said there was a lack of camps, service facilities, or aid, as the families camped under trees and on the streets.

The deputy council leader on Ramadi said on Saturday night that 503 persons had been killed in fighting, including security personnel and civilians slain by bombardment and explosive devices and vehicles.

He said at least 29 explosives-filled cars were detonated by the Islamic State assault.

There are also unconfirmed reports that gunmen executed 18 security fighters whom they surrounded and captured.

On Sunday afternoon, the Anbar Provincial Council met in Baghdad and voted to ask the al-Abadi Government to send Shia militias to rescue the situation. Abadi responded for a statement calling on the militias to mobilize.

The US has opposed the militias’ deployment, arguing that this could inflame sectarian tensions in the province.

Anbar officials met over the weekend with the US Ambassador to Iraq, Stuart E. Jones, over the issue. Jones reportedly said that Washington would continue its air campaign, provided that the militias were under the command of Prime Minister al-Abadi and not Iranian advisers, and that the militias were properly organized to avoid US bombing.

The Shia militias were significant in the recapture of Tikrit, north of Baghdad, from the Islamic State in late March.

As they considered asking for the militias’ assistance,