The U.S. said the number of global terrorist attacks declined slightly between 2014 and 2015, although the Islamic State group expanded its reach.

Iran remained the leading state sponsor of terrorism despite sealing a nuclear deal with world powers, the State Department said in its annual survey of worldwide terrorism released Thursday.

The department reported a 13 percent decrease in attacks in 2015 from the year before -- the first such decline since 2012 -- but said the threat from extremists keeps evolving as groups exploit lawlessness in ungoverned areas and seize on corruption to recruit members.

"The global terrorist threat continued to evolve rapidly in 2015, becoming increasingly decentralized and diffuse," it said. "Terrorist groups continued to exploit an absence of credible and effective state institutions, where avenues for free and peaceful expression of opinion were blocked, justice systems lacked credibility, and where security force abuses and government corruption went unchecked."

Statistics compiled for the report by researchers from the National Consortium for the Study of Terrorism and Responses to Terrorism showed that there were 11,774 attacks that resulted in 28,328 deaths in 2015, compared with 13,463 attacks in 2014 that killed 32,727 people. Of those killed in 2015, 19 were private American citizens, compared with 24 in 2014.

The report attributed the decline to fewer attacks and deaths in Iraq, Pakistan and Nigeria but noted that attacks increased in number between 2014 and 2015 in Afghanistan, Bangladesh, Egypt, the Philippines, Syria and Turkey.

The report said that while the Islamic State's control of territory in Iraq and Syria ebbed toward the end of 2015, it remained the greatest worldwide terrorist threat with a "formidable force" of fighters in those two countries.

It noted that IS group followers also carried out deadly attacks in Turkey, France and Lebanon, demonstrating international capability. It said that those attacks may have been part of "an effort to assert a narrative of victory in the face of steady losses of territory in Iraq and Syria."

Al-Qaida and affiliates also remained active in Afghanistan, Pakistan and parts of west and north Africa, where it continued to stage mass casualty strikes, including on hotels in Burkina Faso, Mali and Tunisia as well as the bombing of a Russian passenger jet over Egypt's Sinai Peninsula, it said. In East Africa, the report noted that Somali group al-Shabab remained a serious threat in 2015 not only in Somalia but in neighboring Kenya where the group attacked a university in April, killing nearly 150 people.

Along with Afghanistan, Pakistan, Iraq, the Sinai, Somalia and Syria, the report designated Libya, the southern Philippines, the Sahara, Yemen and portions of Colombia and Venezuela as "terrorist safe havens" where groups are able to operate with relative ease due to poor or inadequate governance.

Meanwhile, as it has done in numerous previous years, the report identified Iran as the world's "foremost state sponsor of terrorism in 2015" through its provision of financial support, training and equipping of various extremist groups, notably Lebanon's Hezbollah, as well as the government of Syrian President Bashar Assad. 

In addition to Iran, Syria and Sudan were again tagged as state sponsors of terrorism in the report, which is the first to be released since the Obama administration removed Cuba from the list last year as Washington and Havana moved to normalize ties.

Although it achieved a diplomatic resolution to concerns over its nuclear program, Iran in 2015 continued to use the Quds Force of its Islamic Revolutionary Guard Corps to implement foreign policy goals, which include creating instability throughout the Middle East, according to the report. In addition to arming the Hezbollah and the Assad government, it also provided weapons and other assistance to militants in Bahrain and remained active in supporting anti-Israel groups such as Hamas, the report said.

Iran is also widely suspected of helping Houthi rebels in Yemen, although the report did not mention the alleged connection.