Recent offensives against Mosul and Raqqa threaten to remove the Islamic State from its two largest strongholds.

The Islamic State was able to carve out a sprawling territory across Iraq and Syria through military dominance over 126 key places. But the group’s momentum has slowed over the past year, and it has lost its hold on half of those locations.

As the militant group has been squeezed in Iraq and Syria, there are signs that it has been shifting its focus from controlling territory to executing terror attacks in Iraq and abroad.

Out of 10 Cities, the Islamic State Remains in Four

The group has been forced out of about 63 places where it once had control, including six major cities, since it made rapid advances across the two countries in 2014.

Three miles Abu Ghraib Lost by ISIS in February 2016 Half mile Lost by ISIS

in February 2016 Feb. 2016 Baquba Lost by ISIS in September 2014 Half mile Lost by ISIS

in September 2014 Sept. 2014 Deir al-Zour Captured by ISIS in July 2014 Half mile Falluja Lost by ISIS in June 2016 Half mile Lost by ISIS

in June 2016 June 2016 Manbij Lost by ISIS in August 2016 Half mile Lost by ISIS

in August 2016 Aug. 2016 Mosul Captured by ISIS in June 2014 Half mile Ramadi Lost by ISIS in January 2016 Half mile Lost by ISIS

in January 2016 Jan. 2016 Raqqa Captured by ISIS in January 2014 Half mile Tikrit Lost by ISIS in March 2015 Half mile Lost by ISIS

in March 2015 March 2015 Tal Afar Captured by ISIS in June 2014 Half mile

In June 2014, the Islamic State stunned the world when it seized Mosul, by far the largest city it controls, from Iraqi soldiers who dropped their weapons and fled.

But the group’s momentum has shifted. “The caliphate has been crumbling at the edges,” said Columb Strack, a senior analyst at IHS Conflict Monitor, an organization that has been tracking which cities and towns make up the militant group’s territory.

Iraqi security forces regained control of Ramadi in January after months of battling Islamic State fighters there. Many homes in the city were destroyed or rigged with explosives during the fighting, and most residents have yet to return.

The Syrian government is fighting to remove the Islamic State from parts of Deir al-Zour. If the government succeeds, the militants will lose a crucial connection between their strongholds in Raqqa and Mosul, making it more difficult for them to move quickly to defend territory, Mr. Strack said.

The Militants Capture Infrastructure and Resources to Generate Revenue

As they seized cities, Islamic State militants also captured valuable resources like oil fields and hydroelectric dams, which have helped them generate income. The group’s oil and gas revenue is down 26 percent since last year but still adds up to about $23 million a month, according to IHS.

Half mile Kabiba Oil Field Lost by ISIS in February 2016 500 feet Lost by ISIS

in February 2016 Feb. 2016 Ajeel Oil Field Lost by ISIS in May 2015 500 feet Lost by ISIS

in May 2015 May 2015 Al-Badia Cement Plant Lost by ISIS in April 2016 500 feet Lost by ISIS

in April 2016 April 2016 Tanak Oil Field Captured by ISIS in July 2014 500 feet Al-Ward Oil Field Captured by ISIS in July 2014 500 feet Alas Oil Field Lost by ISIS in May 2015 500 feet Lost by ISIS

in May 2015 May 2015 Baath Dam Captured by ISIS in January 2014 500 feet Baiji Refinery Lost by ISIS in October 2015 500 feet Lost by ISIS

in October 2015 Oct. 2015 Deiro Oil Field Captured by ISIS in June 2014 500 feet Shula Oil Field Captured by ISIS in June 2014 500 feet Akashat Phosphate Mine Lost by ISIS in May 2016 500 feet Lost by ISIS

in May 2016 May 2016 Mosul Dam Lost by ISIS in August 2014 500 feet Lost by ISIS

in August 2014 Aug. 2014 Omar Oil Field Captured by ISIS in July 2014 500 feet Furat Dam Captured by ISIS in January 2014 500 feet Al-Taim Oil Field Captured by ISIS in June 2014 500 feet Qayara Oil Field Lost by ISIS in August 2016 500 feet Lost by ISIS

in August 2016 Aug. 2016 Shaer Gas Field Captured by ISIS in November 2014 500 feet T1 Pumping Station Captured by ISIS in June 2014 500 feet T2 Pumping Station Captured by ISIS in July 2014 500 feet T3 Pumping Station Captured by ISIS in May 2015 500 feet Tishreen Dam Lost by ISIS in December 2015 500 feet Lost by ISIS

in December 2015 Dec. 2015

The Islamic State’s three largest oil fields — Omar, Tanak and Al Taim — are all in Syria and together produce an estimated 13,500 barrels of oil per day.

The militants captured Mosul Dam in August 2014. American officials had expressed fears that the militants might intentionally damage the structure, flooding several cities and endangering more than a million people. But Iraqi and Kurdish forces retook the dam after two weeks.

The Group Has Maintained a Nearly Continuous Hold Along the Euphrates River

North Rawah Deir al-Zour Hit LOST Al-Baghdadi LOST Mayadin Asiriyah LOST Tabqa Al-Qaim Baghdad IRAQ SYRIA 25 MI North Rawah Deir al-Zour Hit LOST Al-Baghdadi LOST Mayadin Asiriyah LOST Tabqa Al-Qaim Baghdad IRAQ SYRIA 25 MI North Rawah Hit LOST Deir al-Zour Al-Baghdadi LOST Mayadin Tabqa Al-Qaim Baghdad SYRIA IRAQ 25 MI North Rawah Deir al-Zour Al-Baghdadi LOST Mayadin Tabqa Hit LOST Al-Qaim Baghdad SYRIA IRAQ 25 MI North LOST LOST Baghdad SYRIA IRAQ 50 MI

The Islamic State has contested or controlled many towns along the Euphrates River since as early as January 2014, giving them access to important roads and infrastructure that connect their territory across Syria and Iraq.

The town of Mayadin, which in 2004 had a population of about 44,000, is important to the Islamic State as an uncontested administrative center that is close to one of its major oil fields.

Half mile Kasra Captured by ISIS in June 2014 500 feet Maskana Captured by ISIS in January 2014 500 feet Ayyash Captured by ISIS in January 2016 500 feet Asiriya Lost by ISIS in March 2016 500 feet Lost by ISIS

in March 2016 March 2016 Ashara Captured by ISIS in July 2014 500 feet Maadan Captured by ISIS in June 2014 500 feet Saqra Captured by ISIS in June 2014 500 feet One mile Al-Bu Kamal Captured by ISIS in June 2014 Quarter mile Hit Lost by ISIS in April 2016 Quarter mile Lost by ISIS

in April 2016 April 2016 Karama Captured by ISIS in June 2014 Quarter mile Tabqa Captured by ISIS in August 2014 Quarter mile Baghdadi Lost by ISIS in March 2015 Quarter mile Lost by ISIS

in March 2015 March 2015 Rawa Captured by ISIS in June 2014 Quarter mile Mayadin Captured by ISIS in July 2014 Quarter mile Qaim Captured by ISIS in June 2014 Quarter mile

The Islamic State Has Lost Its Key Corridor to Turkey

10 MI Kobane LOST TURKEY Jarabulus LOST Tal Abyad LOST Tal Khanzir LOST Ghabsha LOST Kafr Ghan Tel Hamees LOST Al-Ra'i LOST Sarrin LOST Dabiq Suluk LOST Mabrouka LOST Manbij LOST Harbul LOST Al-Bab Ayn Issa LOST SYRIA Aleppo 10 MI Kobane LOST TURKEY Jarabulus LOST Tal Abyad LOST Tal Khanzir LOST Ghabsha LOST Kafr Ghan Tel Hamees LOST Al-Ra'i LOST Sarrin LOST Dabiq Suluk LOST Mabrouka LOST Manbij LOST Harbul LOST Al-Bab Ayn Issa LOST SYRIA Aleppo 25 MI TURKEY Kobane LOST Jarabulus LOST Tal Khanzir LOST Tal Abyad LOST Kafr Ghan Tel Hamees LOST Sarrin LOST Suluk LOST Mabrouka LOST Al-Bab Manbij LOST Ayn Issa LOST SYRIA Aleppo 25 MI Kobane LOST Jarabulus LOST TURKEY Tel Hamees LOST Sarrin LOST Ghabsha LOST Suluk LOST Al-Bab Manbij LOST SYRIA Aleppo Kobane LOST 25 MI TURKEY Tel Hamees LOST Hasakah Suluk LOST Manbij LOST SYRIA Aleppo

After losing a monthslong battle with Kurdish forces for control of Kobani, a key Syrian town on the border with Turkey, the Islamic State was quickly pushed out of a large stretch of northern Syria.

Now, the Islamic State is fighting to hold onto a strategic corridor at the Turkish border that allows their people and goods to move between the two countries.

Half mile Kafr Ghan Lost by ISIS in October 2016 500 feet Lost by ISIS

in October 2016 Oct. 2016 Ayn Issa Lost by ISIS in June 2015 500 feet Lost by ISIS

in June 2015 June 2015 Al-Ra'i Lost by ISIS in August 2016 500 feet Lost by ISIS

in August 2016 Aug. 2016 Dabiq Lost by ISIS in October 2016 500 feet Lost by ISIS

in October 2016 Oct. 2016 Ghabsha Lost by ISIS in May 2015 500 feet Lost by ISIS

in May 2015 May 2015 Harbul Lost by ISIS in August 2016 500 feet Lost by ISIS

in August 2016 Aug. 2016 Mabrouka Lost by ISIS in May 2015 500 feet Lost by ISIS

in May 2015 May 2015 Suluk Lost by ISIS in June 2015 500 feet Lost by ISIS

in June 2015 June 2015 Tal Abyad Lost by ISIS in June 2015 500 feet Lost by ISIS

in June 2015 June 2015 Tal Khanzir Lost by ISIS in May 2015 500 feet Lost by ISIS

in May 2015 May 2015 Tel Hamees Lost by ISIS in February 2015 500 feet Lost by ISIS

in February 2015 Feb. 2015 One mile Al-Bab Captured by ISIS in June 2014 Quarter mile Kobani Lost by ISIS in January 2015 Quarter mile Lost by ISIS

in January 2015 Jan. 2015 Jarabulus Lost by ISIS in August 2016 Quarter mile Lost by ISIS

in August 2016 Aug. 2016 Sarrin Lost by ISIS in August 2015 Quarter mile Lost by ISIS

in August 2015 Aug. 2015

The Militants Often Capture Weapons Along With Military Bases

Many of the weapons used by Islamic State fighters have come from military facilities that the group has seized from the Iraqi and Syrian governments.

In January, the Islamic State had its largest weapons windfall when it took control of the Ayyash Arms Depot in Syria, capturing an estimated two million rounds of ammunition, 9,000 grenades and 100 antitank missiles.

But the group has not always taken full advantage of military seizures. Despite capturing a number of air bases, there is no evidence that they have flown any planes.

Half mile Kisik Military Base Lost by ISIS in January 2015 500 feet Lost by ISIS

in January 2015 Jan. 2015 121st Regiment Artillery Base Lost by ISIS in November 2015 500 feet Lost by ISIS

in November 2015 Nov. 2015 Kweiris Air Base Lost by ISIS in November 2015 500 feet Lost by ISIS

in November 2015 Nov. 2015 Abu Allaj Checkpoint Captured by ISIS in August 2014 500 feet 17th Division Army Base Lost by ISIS in June 2017 500 feet Lost by ISIS

in June 2017 June 2017 Mheen Arms Depot Lost by ISIS in December 2015 500 feet Lost by ISIS

in December 2015 Dec. 2015 Camp Ashraf Lost by ISIS in July 2014 500 feet Lost by ISIS

in July 2014 July 2014 Ayyash Arms Depot Captured by ISIS in January 2016 500 feet Durayhib Military Base Captured by ISIS in 2014 500 feet Kilo 160 Checkpoint Lost by ISIS in April 2015 500 feet Lost by ISIS

in April 2015 April 2015 Al-Muthanna Chemical Weapons Facility Lost by ISIS in October 2014 500 feet Lost by ISIS

in October 2014 Oct. 2014 Samarra East Air Base Lost by ISIS in December 2014 500 feet Lost by ISIS

in December 2014 Dec. 2014 Tabqa Air Base Captured by ISIS in August 2014 500 feet Tal Dakwa Outpost Captured by ISIS in February 2015 500 feet Tallat Na'imat Captured by ISIS in July 2015 500 feet Waleed Border Crossing Lost by ISIS in August 2016 500 feet Lost by ISIS

in August 2016 Aug. 2016

Territorial Losses Mean that the Islamic State Is Making Less Money

The Islamic State has lost about 45 percent of its territory in Syria and 20 percent in Iraq since the peak of its control in August 2014, according to estimates by American officials. With every town and village that is lost, the group also loses income that comes from taxes and fines.

After years of conflict, there are no current population figures for these places. But based on preconflict census data and government estimates, the places that the group has contested or controlled once had a combined population of at least 3.7 million people.