Australia will maintain a military presence in Iraq well into 2018 as local security forces continue their fight against Islamic State insurgents who have escaped capture.

Iraqi Prime Minister Haider al-Abadi declared victory over the extremist group at the weekend, three years after IS first stormed the country and seized a third of its territory.

Air strikes target Islamic State positions on the edge of the Old City in Mosul, Iraq. Credit:Felipe Dana

The declaration came after Iraqi forces recaptured the last areas still under IS control along the border with Syria. But while the territorial battle is over, coalition security forces now expect the group's remnants to engage in a new phase of deadly guerilla warfare.

Prime Minister Malcolm Turnbull congratulated the people of Iraq and their security forces for their "courage and determination".