In the late eighteenth century, Ottoman rule stretched from Turkey through much of Eastern Europe and into Asia. Some North African states were affiliated with the Ottoman, although the kingdom of Morocco was independent. Those countries' people were primarily Muslims. Pirates along the North African, or Barbary, coast preyed on US ships and took captives. Diplomatic channels were not very useful, because the pirates (corsairs) operated separate from government control. On occasions of suspected or proven official involvement, however, the United States declared war. The two relevant wars were with Tripoli, from 1801 to 1805, and Algiers, from 1815 to 1816.
In contemporary situations, one of the most significant US efforts to combat the threat of specific Islamist extremists has been through participation in initiatives toward the Islamic State of Iraq and Syria (ISIS), according to the U.S. Department of State website. Because this Islamic “state” operates within several nations but is not equivalent to the government of a given nation, a broad international coalition is necessary in the efforts to defeat it. This global coalition of the United States and numerous European and Middle Eastern partners operates along five mutually reinforcing lines. In addition to military support, these lines include expanding available information and supporting humanitarian causes.
Overall, similarities to modern conflicts with extremists include the aggressors’ Islamic faith and attacks on US military and civilians. As well, most of the opponents are not official government groups but independent entities, so declared wars are the exception.