The global stage is rearranging—who will emerge as the next great political power?

Terrorist attacks took a nosedive last year in one of the most terrorism-prone regions of the world.

The number of attacks in the Middle East and North Africa dropped to 3,780 in 2017, from more than 6,110 the year prior. That’s a decrease of almost 40%. And the number of deaths caused by terrorism in the region fell by almost half.

The numbers, from the Global Terrorism Database, a compilation of attacks published yearly by the University of Maryland, show that the steepest drops were in Iraq, Turkey (due to fewer strikes by Kurdish rebels), Libya, Yemen (where incidents fell despite the civil war), and Syria.

The Islamic State’s retreat in 2017 also contributed to the decline. The main faction of the terrorist network, active mostly in Iraq and Syria, authored fewer attacks, as shown in the chart below. Its local factions, operating in countries like Libya and Egypt, also had less impact.

The drop in the Middle East, coupled with decreases in Asia and Africa, has been the main driver of a global decline in terror. Attacks around the world went from about 17,000 three years ago to about 11,000 last year.

Despite the drop, terrorism is still widespread in Asia, the Middle East, and Africa—nine in every 10 attacks in 2017 took place in those regions.