By Ahmed Rasheed

BAGHDAD (Reuters) - An Iraqi commander expects to dislodge Islamic State from Mosul in May despite resistance from militants in the densely populated Old City district.

The battle should be completed "in a maximum of three weeks", the army's chief of staff, Lieutenant General Othman al-Ghanmi, was quoted as saying by state-run newspaper al-Sabah on Sunday.

A U.S.-led international coalition is providing air and ground support for the offensive in Mosul, the largest city in northern Iraq, which fell to hardline Sunni Muslim fighters in June 2014.

Islamic State has lost most of the city since the offensive began in October and is now surrounded in the northwestern districts, including the historic Old City center.

The United Nations believes up to half a million people remain in the area, 400,000 of whom are in the Old City with little food, water and medicine.

The militants have dug in among the civilians, often launching deadly counter-attacks to repel forces closing in on the Old City's Grand al-Nuri Mosque, from where Islamic State leader Abu Bakr al-Baghdadi declared a caliphate over parts of Iraq and Syria.

The hardline group persecuted non-Sunni communities and inflicted harsh punishments on Sunnis who do not abide by its extreme interpretation of Islam.

SLAVERY

A group of 36 Yazidi survivors has been rescued after three years of "slavery" under Islamic State's rule, the United Nations said on Sunday.

Since Friday, the women and girls from the group have received lodging, clothing, medical and psychological aid in Duhok, a Kurdish city north of Mosul, said a statement from U.N. Humanitarian Coordinator for Iraq Lise Grande.

The Yazidis, whose beliefs combine elements of several Middle Eastern religions, were the most persecuted community under Islamic State which considered them devil-worshippers.

The U.N. estimates that up to 1,500 Yazidi women and girls remain in captivity, suffering abuse.

Iraqi forces estimate the number of Islamic State fighters still in Mosul at 200 to 300, mostly foreigners, down from nearly 6,000 when the offensive started. They are still capable of deadly counter-attacks on the tens of thousands of soldiers and paramilitary groups arrayed against them.

Story continues

A Federal Police brigade commander and 18 other members of the Interior Ministry force were killed in attacks on two positions at the edge of the Old City on Friday, military sources said.

Federal Police took back the positions on Saturday but the ministry has sacked a commander for failing to fend off the counter-attacks, the sources said.

The Federal Police said it had since strengthened fortifications around the Old City with concrete blocks to prevent suicide attacks on its forces.

The U.S.-trained Counter Terrorism Service and Federal Police are the main forces fighting inside Mosul. Regular Iraqi army units are taking part in battles outside the city, alongside Shi'ite volunteers trained and armed by Iran, Kurdish Peshmerga fighters and Sunni tribes.

The total number of fighters aligned against Islamic State in Mosul exceeds 100,000.

Islamic State announced attacks on Sunday the Shi'ite paramilitary northwest of Mosul and on an Iraqi army position in Akashat, near the Syrian border, an area where its leader, Abu Bakr al-Baghdadi, is believed to be hiding, according to the Iraqi military.

The Iraqi army said its ground and air forces pushed back the attack, killing eight militants.

Several thousands of people have been killed so far in the battle, both civilians and military, according to international aid organizations. The total number of people displaced from Mosul since October is close to 400,000, about a fifth of the population before its capture by Islamic State.

Even if defeated in Mosul, Islamic State will remain in control of vast swathes of land in the border area with Syria.

(Writing by Maher Chmaytelli; Editing by Janet Lawrence and Robin Pomeroy)