IRAN'S supreme leader has condemned US intervention in Iraq, accusing Washington of seeking control as Sunni insurgents continue to drive toward Baghdad from the Syrian border and consolidate positions in the north and west of the embattled state.

The statement by Ayatollah Ali Khamenei was the clearest statement of opposition to a US plan to dispatch up to 300 military advisers in response to pleas from the Iraqi government and runs counter to speculation that old enemies Washington and Tehran might cooperate to defend their mutual ally in Baghdad.

"We are strongly opposed to US and other intervention in Iraq," Irna news agency quoted the ayatollah as saying. "We don't approve of it, as we believe the Iraqi government, nation and religious authorities are capable of ending the sedition."

The Iranian and the US governments had seemed open to collaboration against al Qaeda offshoot the Islamic State in Iraq and the Levant (Isis), which is fighting both the US-backed, Shi'ite-led government of Iraq and the Iranian-backed president of Syria, whom Washington wants to see overthrown.

"American authorities are trying to portray this as a sectarian war, but what is happening in Iraq is not a war between Shi'ites and Sunnis," said Mr Khamenei, who has the last word in the Islamic republic's Shi'ite clerical administration.

Accusing Washington of using Sunni Islamists and followers of former Iraqi dictator Saddam Hussein, he added: "The US is seeking an Iraq under its hegemony and ruled by its stooges."

Tehran and Washington have been shocked by the lightning quick offensive, spearheaded by Isis, that has seen large swathes of northern and western Iraq fall to the hardline extremist group and other Sunni fighters since June 10, including the north's biggest city, Mosul.

The Sunnis are united in opposition to what they see as Shi'ite Prime Minister Nuri al-Maliki's divisive sectarian rule.

Yesterday, Isis thrust east from a newly captured Iraqi-Syrian border post, taking three towns in Iraq's western Anbar province after seizing the frontier crossing near the town of Qaim on Saturday.

The gains have helped Isis secure supply lines to Syria, where it has exploited the chaos of the uprising against President Bashar al Assad to seize territory.

The group aims to create an Islamic caliphate straddling the desert border and has held Falluja, just west of Baghdad, since the start of the year.

The fall of Qaim represented another step towards the realisation of Isis's military goals, erasing a frontier drawn by British and French colonial map-makers a century ago.

The gains yesterday included the towns of Rawa and Ana along the Euphrates river east of Qaim, as well as the town of Rutba further south on the main highway from Jordan to Baghdad.

A military intelligence official said Iraqi troops had withdrawn from Rawa and Ana after Isis militants attacked the settlements late on Saturday. He said: "Troops withdrew from Rawa, Ana and Rutba this morning and Isis moved quickly to completely control these towns. They took Ana and Rawa this morning without a fight."

Military spokesman Major-General Qassim al Moussawi said the withdrawal from the towns was intended to ensure "command and control" and to allow troops to regroup and retake the areas. "The withdrawal of the units was for the purpose of reopening the areas," General al Moussawi said from Baghdad.

The towns are on a strategic supply route between Isis positions in Iraq and eastern Syria, where the group has taken a string of towns and strategic positions over the past few days from rival Sunni forces fighting Mr Assad.