United States forces bombed the compound where Abu Bakr al-Baghdadi was said to have been killed to ensure it was destroyed. Omar Haj Kadour/Agence France-Presse — Getty Images

The compound where Abu Bakr al-Baghdadi, the founder and leader of the Islamic State, was said to have died was located in an unexpected part of northwest Syria, far from the terrorist group’s former stronghold.

Raided compound 100 FEET Raided compound 100 FEET The New York Times · Satellite image by Maxar Technologies

The compound was just a few miles from the Turkish border in a small village called Barisha, about 15 miles north of Idlib, the closest major city. President Trump announced on Sunday that Mr. al-Baghdadi was dead after a raid on the compound by United States Special Forces.

Barisha Site of the raid 1,000 FEET Barisha Site of the raid 1,000 FEET The New York Times · Satellite image by Maxar Technologies

American officials said they were surprised to learn that Mr. al-Baghdadi was hiding out in Idlib Province, an area dominated by rival Qaeda groups and that is hundreds of miles from the Islamic State’s former territory along the border between Syria and Iraq.

Turkey 20 MILES Turkish army AND syrian opposition Mediterranean Sea Manbij KURDISH Control Site of the raid M4 Barisha Jihadist Opposition (Including Al-Qaeda) Aleppo Idlib SYRIAN OPPOSITION (TURKEY-BACKED) SYRIA AREA OF DETAIL Government Control SYRIA Turkey Turkish army AND syrian opposition 20 MILES Mediterranean Sea Manbij Site of the raid M4 KURDISH Control JIHADIST OPPOSITION (Including Al-Qaeda) Barisha Idlib SYRIAN OPPOSITION (TURKEY-BACKED) SYRIA AREA OF DETAIL Government Control SYRIA The New York Times | Sources: Control areas as of Oct. 21 via Conflict Monitor by IHS Markit; Institute for the Study of War.

The region is also far from the area of northeastern Syria where Turkish forces have moved into Kurdish-held territories in recent weeks after President Trump announced the withdrawal of American troops there.

Kurdish intelligence was said to have worked with United States intelligence to locate Mr. al-Baghdadi and monitor his movements, even after Mr. Trump pulled his support for the Kurds, a longtime ally in the fight against the Islamic State.

Control areas Kurdish Government Islamic State Other opposition Turkish Army and Syrian opposition Turkey Turkey Barisha Raqqa Raqqa Syria Syria lebanon lebanon Iraq Iraq Damascus Damascus Oct. 2015 Oct. 2019 50 MILES Jordan Jordan Turkey Turkey Raqqa Raqqa Barisha Syria Syria lebanon lebanon Iraq Iraq Damascus Damascus Oct. 2015 Oct. 2019 50 MILES Jordan Jordan Oct. 2015 Turkey Raqqa Syria lebanon Iraq Damascus Jordan Oct. 2019 Turkey Barisha Raqqa Syria lebanon Iraq Damascus 50 MILES Jordan The New York Times | Note: The hatched area shows where Kurdish forces would withdraw under an agreement between Russia and Turkey. Other opposition in 2015 includes Sunni insurgents and in 2019 includes jihadist opposition (including Al-Qaeda) and Turkish-backed Syrian opposition. | Sources: Control areas as of Oct. 26, 2015, and Oct. 21, 2019, via Conflict Monitor by IHS Markit; Institute for the Study of War.

At the height of its power four years ago, the Islamic State ruled a territory the size of Britain and controlled the lives of up to 12 million people. With the help of Kurdish fighters and other allies, United States forces pushed the Islamic State out of its last foothold in Syria earlier this year.

But even without territorial control, the group has been able to carry out attacks through targeted assassinations, bombings, ambushes and raids. Many top leaders are still alive, and hundreds of fighters and their families remain in detention centers or at large.