The Syrian government declared Friday that it had recaptured one of the Islamic State's last remaining strongholds in the country, as the militant group mounted a final stand across the border in Iraq.

Syrian Brig. Gen. Ali Mayhoub, a military spokesman, described victory in the eastern city of Deir al-Zour as the “last phase” in the army’s campaign to defeat the Islamic State in Syria, three years after the group declared a “caliphate” stretching from the country’s northeast to territory deep inside Iraq.

Deir al-Zour had been divided into zones controlled by the Syrian government and the Islamic State for nearly three years. It is the largest city in eastern Syria and the largest to be recaptured by forces loyal to Syrian President Bashar al-Assad.

“With the loss of Deir al-Zour, Daesh loses its ability to lead terrorist operations by its militants who are now isolated and encircled” east of the city, said Mayhoub, using the Arabic name for the Islamic State.

A soldier from the Syrian government forces flashes a victory sign during an operation to retake the eastern Syrian city of Deir al-Zour from the Islamic State on Nov. 2, 2017. (Stringer/AFP/Getty Images)

At its height, the Islamic State’s caliphate was the size of Belgium. The fighters now hold just a small stretch of towns running south along the Euphrates River and into Iraq. They are bombarded daily by U.S.-led coalition airstrikes as they battle a broad array of forces closing in on the ground.

In Syria, that means rival U.S.- and Syrian-backed offensives. Across the border, it is the Iraqi army and Iranian-backed militias that are beating back the Islamic State.

U.S. Army Col. Ryan Dillon, a spokesman for the U.S.-led military coalition against the Islamic State, said Friday that the Syrian regime's claims that it has taken Deir al-Zour city are "plausible." But he noted that the province by the same name extends well beyond the city to east of the Euphrates River, in an area where U.S.-backed Syrian fighters have clashed with the Islamic State and taken back territory.

Dillon said the Islamic State still holds territory further south along the river valley in Abu Kamal, and down to the Syria-Iraq border. There are challenges in operating in area with numerous forces, he said, but U.S.-backed fighters already have done so in other areas from the border of Turkey to Iraq.

"The coalition will deny ISIS safe haven in Iraq and Syria," he said. "We will not relent in our pursuit of ISIS and will continue degrade these terrorists' ability to plan, resource, and launch attacks."

Iraq’s military said Friday that its forces have taken control of Qaim, a western border town and the last in the country to be nominally controlled by the militants.

Qaim has been a strategic location for the group, providing a link to Bukamal — one of its few remaining strongholds in Syria.

Yehya Rasool, a spokesman for Iraq’s joint operations command, said small pockets of Islamic State resistance persist around Qaim and that he expected them to be cleared by Saturday. A neighboring town, Rawa, is also not yet fully controlled by government forces, he said.

Iraqi Prime Minister Haider al-Abadi issued two statements late Friday congratulating the combined military, police and militia forces for securing the strategic border and Qaim. He said the battle for Qaim, launched last Thursday, was won in “record time.”

In addition, the military said government forces have seized the border crossing between Syria and Iraq in Qaim. The capture deprives the militants of a critical juncture they had used to move fighters and equipment between their shrinking territory straddling both countries. The area had been under Islamic State control since 2014.

Earlier this week, Abadi said Iraq would soon be able to claim total victory over the Islamic State in Iraq.

Though small, Qaim has been an important town for the Islamic State. U.S. and Iraqi intelligence officials have said the militants used Qaim as a safe destination for their top commanders and leaders as battles raged in larger cities such as Mosul earlier this year.

Army Maj. Gen. James B. Jarrard, commander of the U.S.-led Special Operations joint task force fighting the Islamic State, said in a news briefing Tuesday that there are probably between 3,000 and 7,000 Islamic State fighters left throughout the Euphrates River valley, from Deir al-Zour to Qaim in Iraq.

In late August, Lt. Gen. Stephen J. Townsend, the outgoing overall commander of U.S. forces in Iraq and Syria, said he believed that Islamic State leader Abu Bakr al-Baghdadi was hiding in the vast desert region that includes Qaim.

El-Ghobashy reported from Cairo. Dan Lamothe in Washington contributed to this report.

Read more: