Updated

Expelling the Islamic State group from the last territory it controlled along the Syrian-Turkish border has effectively cut the militants' supply lines from the outside world. That could affect their ability to protect their last bastions — the cities of Raqqa in Syria and Mosul in Iraq.

The area under IS control has been shrinking for months, under assault from forces determined to wipe out the self-declared "caliphate." The fight for Mosul appears to be imminent, with U.S.-backed Iraqi forces closing in, and Raqqa will probably be in the crosshairs for an attack possibly led by Kurdish militias in the near future.

If removed from power in the territory it controls, many fear it will turn even more decisively toward terrorist attacks against civilians in the region and in the West, operating from the shadows. It that way, it will be more like the group it developed from: al-Qaida.

A look at the current battle against Islamic State:

HOW DID THE SUPPLY LINES FROM TURKEY WORK?

After the Syrian conflict began in March 2011, people could evade Turkish troops on the border and sneak into or out of Syria. Many of those crossing into Syria were jihadis from around the world joining al-Qaida's branch. Others, mostly Syrians, could use border checkpoints. Smugglers also were active, helping people cross over.

WHY DID TURKEY ALLOW THIS, AND WHAT CHANGED?

For years, Turkey turned a blind eye to the crossings. Neighboring countries also had been buying oil from IS at rates cheaper than those on international markets. But Europe put pressure on Turkey after the Charlie Hebdo attack in France in 2015, and Ankara began to tighten its border security. Turkey's gradual shift was followed by attacks blamed on the group inside Turkey itself, including one at Istanbul's airport. Once relations improved between Turkey and Russia, and following a July coup attempt failed to remove President Recep Tayyip Erdogan from power, he sent his forces into Syria to battle the extremists, as well as Kurdish fighters who had crossed to the west bank of the Euphrates River against Turkey's will. The Turkish acquiescence to IS finally seemed to be over. On Sunday, Turkish troops and Turkish-backed Syrian rebels captured all Syrian areas along the border that had been held by IS.

HOW DO MOSUL AND RAQQA STILL GET SUPPLIES?

Since Turkey tightened its border, IS has been relying on products brought from Turkey into the rebel-held Syrian border town of Azaz. Syrian merchants go to Azaz, buy what they need, and ship it by truck to Raqqa. Once inside IS-controlled areas, products would be sent to other IS-held territory.

WHO IS FIGHTING THE ISLAMIC STATE GROUP?

Many forces are fighting IS in Syria and Iraq, some backed by the U.S., and others by powers including Russia, Iran, and Turkey. The most effective group has been the Kurdish-led Syria Democratic Forces, which captured wide areas in northern Syria from the extremists in the past year under the cover of intense airstrikes by a U.S.-led coalition. Also fighting the extremists are members of Lebanon's Hezbollah group and Syrian government troops, mostly in central Syria. Turkey-backed rebel factions such as the Sultan Murad, Mountain Hawks, Shamiya Front and Liberation Army have been part of Ankara's offensive that began Aug. 24 and captured all IS-held border area from the Syrian side.

In Iraq, the IS militants are under attack from government troops, regional police forces, Sunni tribesmen, Kurdish Peshmerga fighters and Shiite militiamen. Iranians have been active as well, and there have been reports that Gen. Qassem Soleimani, head of Iran's elite Quds Force, led some operations of the Popular Mobilization Forces — Iraq's government-sanctioned, mainly Shiite militias.

HOW IS THE BATTLE GOING?

In Syria, IS has lost the border town of Jarablus, a major crossing point, to Turkish-backed Syrian rebels. In March, IS was driven out of the historic town of Palmyra by Syrian troops backed by Russian airstrikes. The U.S.-led coalition has killed some of the group's founding members, including spokesman and chief strategist Abu Mohammed al-Adnani, and its war minister, Omar al-Shishani.

IS has lost major cities and towns in the past year in Iraq, including Fallujah, Ramadi and Tikrit. Iraqi government troops recently captured the town of Qayara, near Mosul.

HOW MUCH DAMAGE HAS THE ISLAMIC STATE GROUP DONE?

IS has ruled its "caliphate" with an epic level of cruelty: Thousands have been killed and displaced, minority groups like Iraq's Yazidis have been massacred and enslaved, Christians have been displaced, gay men have been thrown to their death from tall buildings, and captives have been slain on video. Among the deadliest incidents was the 2014 killing of 1,700 Iraqi soldiers at Camp Speicher. In Syria, up to 1,000 members of the Shueitat tribe were believed to have been massacred. The Britain-based Syrian Observatory for Human Rights says IS killed 4,401 people since June 2014, including 2,369 civilians. No specific statistics are available in Iraq, where extremists have killed thousands.

The group has caused widespread destruction in areas it controls. It has damaged or destroyed archaeological sites and antiquities such as Palmyra's Temple of Bel, which dated to A.D. 32, and the Temple of Baalshamin, which was fronted by six towering columns. In Iraq, IS members razed the 3,000-year-old city of Nimrod and bulldozed 2,000-year-old Hatra — both UNESCO world heritage sites.

WHAT IS THE FUTURE OF THE ISLAMIC STATE GROUP?

Hilal Khashan, political science professor at the American University of Beirut, believes the Islamic State group "is doomed in its current format," unable to create a viable state. He and other experts see it becoming a decentralized organization, melting into the communities it has ruled like salt in water. "The danger is that what comes after Daesh might be worse," said Iraqi journalist Dana Jalal, who closely follows jihadi groups, using an Arabic acronym for IS. "They will shave their beards, change their clothes and join other organizations that are not considered terrorist groups." That could make it more vicious, he said, carrying out deadly attacks like those in in France, Belgium, Turkey, Iraq and elsewhere. Jalal noted that many members of Saddam Hussein's army and Baath Party went underground and carried out guerrilla warfare against U.S. forces.

___

EDITOR'S NOTE: Bassem Mroue, based in Beirut, has covered the Middle East since 1992.