Iraqi special forces were on the outskirts of Fallujah, the army said, marking a new phase in efforts to take the city from Islamic State of Iraq and the Levant (ISIL) and sparking fears for about 50,000 civilians trapped there.

Fighting with ISIL was ongoing throughout Iraq on Sunday with battles near Mosul in the north and Heet in western Anbar province, as well as across the border in Syria in the city of Raqqa.

In Heet - 140km west of Baghdad - about 40 Iraqi security forces were killed in an ISIL offensive that sent troops, police, and tribal fighters into retreat from the city that was re-taken from the armed group in April, military sources said.

Tens of thousands of soldiers and fighters - made up of military, police and militias, and backed by air power from a US-led coalition - launched an offensive to retake Fallujah last week. The arrival of Iraq's counter-terrorism service (CTS) may signal an all-out assault is imminent.

Abdelwahab al-Saadi, the Iraqi army commander in charge of the operation, said on Sunday that several large contingents had now reached two military camps near the city and were ready to strike.

"These forces will break into Fallujah in the next few hours to liberate it from Daesh," he said, using an Arabic acronym for ISIL, which is also known as ISIS.

The counter-terrorism force said it had the city completely surrounded. Iraqi officials claimed gains against ISIL, but there was no way to independently verify that.

"There is resistence but we are crushing it very quickly... We have a momentum from different fronts," said General Abdelamir al-Shimary from Baghdad's Operations Command.

Fallujah, 50km west of Baghdad, is one of the two remaining major Iraqi cities still in ISIL hands, the other being Iraq's second-largest city Mosul.

The Fallujah operation has come at a human cost, rights groups said, with thousands of civilians trapped between ISIL fighters and the advancing Iraqi army and allied Shia militia.

Some 50,000 people were still stuck in the centre of the city on Sunday, struggling with dwindling water and food supplies. The UN said it had reports of people starving to death and others and being killed for refusing to fight for ISIL.

"We have dramatic reports of the increase of the number of executions of men and older boys, refusing to fight on behalf of ISIL," said Melissa Fleming, a spokeswoman for the UN High Commissioner for Refugees (UNHCR).

About a thousand ISIL fighters still in the city were accused of using civilians as human shields, but UNHCR also said Iraqi forces had blocked supply routes, preventing civilians from getting out.

Hundreds of families were able to flee on Friday with the help of government forces, but the majority remain trapped, aid groups said.

"We are receiving hundreds of displaced Iraqis from the outskirts of Fallujah who are totally exhausted, afraid and hungry," Nasr Muflahi, country director for the Norwegian Refugee Council, said.

"Thousands more remain trapped in the centre of Fallujah, cut off from aid and any form of protection."

Fallujah, a predominantly Sunni city, fell out of government control even before ISIL swept through Iraq's heartland in June 2014, and is one of the group's most iconic strongholds.

Tens of thousands of Iraqi forces - including the Hashed al-Shaabi umbrella group dominated by Shia militias - began an operation on May 22 to retake it.

Peshmerga move on Mosul

Meanwhile, the Kurdistan Regional Government (KRG) announced on Sunday an offensive by Peshmerga forces that captured two ISIL-held towns about 25km from Mosul. About 5,500 fighters were involved, backed by international coalition warplanes.

Peshmerga forces retook al-Muftiyah and Jim Kour towns after heavy clashes in the early hours of Sunday, sources said.

Fierce fighting was ongoing as Peshmerga soldiers advanced towards the town of al-Khazir, 35km east of Mosul.

"This is one of the many shaping operations expected to increase pressure on ISIL in and around Mosul in preparation for an eventual assault on the city," the KRG said in a statement.

In a separate development in neighbouring Syria, heavy fighting continued with ISIL sweeping through Aleppo province in a devastating offensive, cutting off the main road between the towns of Mare and Azaz.

More than 160,000 civilians have been trapped in Syria by the fighting, which also forced the evacuation of one of the few remaining hospitals in the area run by the international medical organisation Doctors Without Borders (MSF).

The UK-based Syrian Observatory for Human Rights said on Saturday that US-led coalition warplanes had targeted ISIL positions north of ISIL's defacto capital Raqqa, reportedly killing as many as 45 ISIL fighters.

Arab, Kurdish and US military forces have been closing in territory around Raqqa over the past week.