BEIRUT (Reuters) - Syria’s army and its allies, spearheaded by Lebanon’s Hezbollah, captured Islamic State’s last stronghold in Syria on Wednesday, a commander in the alliance said, bringing the self-declared caliphate close to complete downfall.

Shi'ite Popular Mobilization Forces (PMF) fighters carry the Islamic State militants flag downward after liberating the city of Al-Qaim, Iraq November 3, 2017. REUTERS/Stringer

“The last stronghold of Daesh (Islamic State), Albu Kamal, is free of the Daesh organization,” said the commander in the military alliance supporting Syrian President Bashar al-Assad.

Islamic State has been all but destroyed over the past two years. At the height of its power in 2015, it ruled an expanse of Iraq and Syria, eradicating the border, printing money, imposing draconian laws and plotting attacks across the world.

On Wednesday, after a months-long advance through central and eastern Syria, the Syrian army and allied Shi’ite militias encircled and attacked Albu Kamal.

Hezbollah was “the foundation in the battle of Albu Kamal”, said the commander, adding that hundreds of the elite forces of the Iran-backed Shi’ite group took part in the battle.

Syrian state television declared “Albu Kamal is liberated”. But a war monitor, the Britain-based Syrian Observatory for Human Rights, said it was not true that Albu Kamal was taken and there was still fighting in the area.

Albu Kamal is located on the border with Iraq on the bank of the Euphrates. During the battle, Hezbollah forces entered Iraq and the Iraqi Popular Mobilisation Forces crossed into Syria to help capture the town, the commander said.

Islamic State retains control over some areas of desert and villages nearby, as well as a town and some other villages in adjacent areas of Iraq, and in scattered pockets elsewhere in both countries.

CONTINUING THREAT

Despite its losses, Islamic State still has a territorial presence in Libya and elsewhere, and many governments expect it to remain a threat even after it loses the caliphate it declared from Mosul, Iraq, in 2014.

It has already carried out guerrilla operations in both Iraq and in Syria, and has continued to inspire lone militants to attack civilian targets in the West.

In Syria, the end of major operations against Islamic State may only prefigure a new phase of the war, as the rival forces which have seized territory from the jihadists square off.

The Syrian army, alongside Hezbollah and other Shi’ite militias, and backed by Iran and Russia, have seized swathes of central and eastern Syria in the advance against Islamic State this year.

Russian official media have in recent weeks reported a surge of strategic bombing and cruise missile strikes on Islamic State targets in eastern Syria as the army advanced.

A U.S.-backed coalition has supported a rival campaign by the Syrian Democratic Forces (SDF), an alliance of Kurdish and Arab militias that have pushed Islamic State from much of the country’s north and east.

NEW PHASE OF WAR

The Syrian government has sworn to recapture territory held by the SDF, including Islamic State’s former capital Raqqa and oil and gas fields east of the Euphrates.

In areas controlled by the SDF in northern Syria, Kurdish-led groups have established autonomy, announcing elections and setting internal policies.

On Tuesday, Bouthaina Shaaban, a senior adviser to Assad, described the U.S. forces aiding the SDF as illegal invaders. Washington has not spelled out how its military support for the SDF would evolve after Islamic State’s defeat.

Shaaban also pointed, in a television interview, to the example of Iraq, where the government retaliated against an autonomous Kurdish region after it held an independence referendum.

Iraqi military officials say small groups of Islamic State militants are still entrenched in the town of Rawa and the border desert strip with Syria. Scattered villages near al-Qaim, close to Albu Kamal, are still under militant control in an area called Rummana.

The Iraqi Popular Mobilisation Forces (PMF), an alliance of militias, earlier on Wednesday denied it had crossed the Syrian border and was attacking Albu Kamal.

“Our movements are carried out under orders from the commander in chief of the armed forces and our key objective is to liberate Iraq’s territories from Daesh. We have no orders to cross the borders,” PMF spokesman Ahmed al-Asadi said.