Iraq's prime minister has urged people in the besieged city of Falluja to drive out al-Qaida-linked insurgents to pre-empt a military offensive that officials said could be launched within days.

In a statement on state television, Nouri al-Maliki, a Shia Muslim whose government has little support in Sunni-dominated Falluja, called on tribal leaders to get rid of fighters from the Islamic State of Iraq and the Levant (Isil) who last week seized key towns in the desert leading to the Syrian border.

"The prime minister appeals to the tribes and people of Falluja to expel the terrorists from the city in order to spare themselves the risk of armed clashes," read the statement.

Tribes from Iraq's once-dominant Sunni minority now control armed militias in the region. Maliki promised the army would not attack residential areas in Falluja as his forces prepare an offensive that has echoes of US assaults in 2004 on the city, 25 miles west of Baghdad's main airport.

Security officials said that Maliki, who is also commander in chief of the armed forces, agreed to hold off an offensive to give tribal leaders in Falluja more time to drive out the Sunni Islamist militants on their own.

"No specific deadline was determined, but it will not be open-ended," a special forces officer said of plans to attack. "We are not prepared to wait too long. We're talking about a matter of days only. More time means more strength for the terrorists."

Isil has emerged in Syria's civil war as an affiliate of the international al-Qaida network and a powerful force among Sunni Muslim rebels seeking to oust President Bashar al-Assad.

In Iraq, it has been tightening its grip on Anbar province, a thinly populated, mainly Sunni region the size of Greece, whose towns are strung along the Euphrates river. Its stated aim has been to create a Sunni state straddling the border into Syria's rebel-held desert provinces.

Two years after US troops ended nine years of occupation, the continued violence in Iraq underlines how civil war between Syrian rebels backed by Saudi Arabia and other Sunni powers on one side and Assad, an ally of Shia Iran, on the other has inflamed a broader regional, sectarian conflict.

The US said on Sunday it would help Maliki fight al-Qaida but would not send troops. An Iranian official offered similar help.

In a shift that reflects some recent rapprochement with Tehran, the US secretary of state, John Kerry, suggested that Iran could play a role in peace talks on Syria.

When Iraqi police broke up a Sunni protest last week in Ramadi, the Anbar capital, the fatal clashes fanned tensions across the province, which was the heart of the insurgency after the 2003 US invasion that brought Shia majority rule.

Al-Qaida's power grab has divided people in Anbar, where many accuse Maliki of shutting Sunnis out of power and of being a pawn of Iran. Some sympathise with and support the Islamist militants, or are too fearful to move against them. Others have vowed to help the government regain control.

"Now we are trying to make al-Qaida fighters leave the city," said one tribal leader in Falluja, a city whose normal population is about 300,000. "Falluja has seen enough blood and killing. We are fed up with violence."

Known as the "City of Mosques" and a focus for the Sunni faith and identity in Iraq, Falluja was badly damaged in two offensives by US forces in 2004 against insurgents. Many people have fled the town in recent days to escape fighting.

But the militants have also received help in Falluja from disgruntled tribesmen who have joined forces with them.

Much of Iraq's US-equipped army is drawn from the Shia majority and faces recalcitrance, if not outright hostility, in Anbar, which covers about a third of Iraq.

Across the border, al-Qaida fighters have also captured swaths of Syria and are battling fellow Islamist brigades as well as against Assad's government forces.

Isil was formed last year through a merger between al-Qaida's Iraqi and Syrian affiliates and has claimed responsibility for attacks in both countries. It includes foreign jihadists in its ranks and among its commanders.

Clashes broke out at dawn west of Ramadi on Monday, between militants and special forces helped by tribal fighters.

"This combat has been going on with a well-trained and a highly organised al-Qaida group," said the Iraqi special forces officer, adding that there were foreign fighters among the militants. "When we defeat it, the balance of power in the whole of Anbar province will change."