(CNN)The attack on Tunisia's famed Bardo Museum is just the latest evidence that parts of North and sub-Saharan Africa have become a magnet for Islamist extremism. Tunisia -- lying just across the Mediterranean from Europe, but bordered on one side by Libya and on the other by Algeria -- has until now not suffered the kind of large-scale terror attacks seen in both those nations in recent years. But it has emerged as a place of increasing concern as the threat of Islamist extremism has intensified in the region. Islamist terrorists also have struck in Algeria, where they killed at least 37 hostages at a gas field in 2013, and in Libya, where terrorists killed the U.S. ambassador and three others in 2012 and where ISIS has established a beachhead in the east. Al Qaeda's North African offshoot Al Qaeda in the Islamic Maghreb (AQIM), which has its roots in Algeria, has captured territory in Mali and taken hostages -- often Europeans -- in countries such as Niger and Mauritania. So what is the world doing about it? The United States has created a military command in Africa and also established a special operations base in Djibouti, which borders Somalia in the Horn of Africa. France has sent troops to Mali. And, as CNN recently reported from Chad, Western militaries have trained special forces from several northern African nations to take on the Islamists. Here's a country-by-country look -- although not exhaustive -- at how Islamist extremism has reared its head across a swath of Africa. Algeria is home to a long-running Islamist insurgency. In perhaps the highest-profile incident, Islamist militants attacked the In Amenas oil and gas plant in southern Algeria in January 2013. At least 37 hostages, including three U.S. citizens, died in the seizure of, and ensuing special forces assault on, the remote facility. Dozens of assailants also died in the days-long siege. The attack was the work of the Mulathameen Brigade, which translates as the "Signatories in Blood Brigade." Last September, another Islamist group beheaded a 55-year-old French hiker, Herve Gourdel, after seizing him as he walked in Djudjura National Park in central Algeria. Days earlier, the outfit -- Jund al Khilafa, a splinter group of Al Qaeda in the Islamic Maghreb -- had pledged allegiance to ISIS. Militants affiliated with AQIM had previously also kidnapped foreigners in Algeria, including Italians and Spaniards. In 2007, AQIM launched a suicide bombing campaign in Algeria, which included a deadly bombing against the U.N. headquarters in Algiers. In January, a suicide bombing and gun attack on a hotel in the capital, Tripoli, killed 10 people, including an American. The attack was swiftly claimed by Wilayat al-Tarabulus, ISIS' name for the province. Politicians in Tripoli disputed the claim. Besides its growing presence in Tripoli, ISIS is now the dominant force in Derna in eastern Libya and controls parts of the town center of Sirte, the hometown of former Libya strongman Moammar Gadhafi. Before the advent of ISIS, an Islamist group called Ansar al Shariah was blamed by the United States for carrying out the September 11,  2012, attack on the U.S. Consulate in Benghazi in which Ambassador Christopher Stevens was killed. State Department computer expert Sean Smith and former U.S. Navy SEALs Tyrone Woods and Glen Doherty, then acting as security contractors, also died. In 2012, Islamist extremists capitalized on chaos in Mali after a military coup and uprising by Tuareg tribesmen to seize control of a large piece of northern Mali, an area the size of France. France intervened militarily in early 2013 and helped to push back the Islamists. Since then, Mali's government has battled various rebel factions, mostly in its northern region, with the help of French and African forces. Recent attacks include a shooting earlier this month at a bar popular with expatriates in the capital, Bamako, which killed five people, including French and Belgian citizens, authorities said. A North African jihadist group, al-Murabitun, claimed responsibility for the attack, according to Mauritanian news agency Al Akhbar. AQIM issued a warning to France via jihadist websites in January, following terror attacks in Paris, stating that "France pays the cost of its violence on Muslim countries and the violation of their sanctity," citing the presence of its soldiers in Mali. According to analysis by Jane's Defence Weekly, despite the shift of jihadist activity east toward Libya, "Mauritania is still an aspirational target for jihadist groups due to its military co-operation with France and Algeria." Jihadist groups including AQIM and the Mulathameen Brigade operate in the porous border areas between Mauritania, Algeria, Mali, Niger and Libya. Militants have in the past kidnapped foreign workers for ransom, including three Spaniards in 2011, according to Jane's. However, since 2011 jihadist activity in the country has declined. Mauritanian troops joined the fight against AQIM militants in Mali. Militant group Boko Haram has waged a campaign of terror in mostly northern Nigeria for over a decade. It has attacked the country's police, military, banks, bus stations and crowded markets, as well carrying out a string of church bombings. Perhaps the most notorious incident came last April, when Boko Haram militants kidnapped more than 200 teenage girls from a boarding school in Chibok, in Borno state. Most of the girls remain missing. In January this year, hundreds of Boko Haram gunmen seized the town of Baga and neighboring villages in northern Nigeria, as well as a multinational military base, leaving bodies scattered everywhere and as many as 2,000 people feared dead. The group's stated aim is to institute Sharia, or Islamic law. Earlier this month, in an audio message purportedly from leader Abubakar Shekau, Boko Haram pledged allegiance to ISIS. It had previously declared ties to AQIM. Al-Shabaab started with a goal of waging a war against the Somali government in an effort to implement a stricter form of Islamic law, or Sharia. It has since shifted focus to terrorist attacks in Somalia and beyond, notably neighboring Kenya. Its most high-profile attack came in that country in 2013, when gunmen struck at Nairobi's upscale Westgate mall, pulling out weapons and gunning down shoppers. The gunmen were accused of torturing some hostages before killing them. As many as 67 people died in the siege. The group has carried out numerous attacks in Somalia's capital, Mogadishu, and elsewhere. Just last week, its target was government offices in the city of Baidoa. It has also recently called for attacks on shopping malls in the United States, Canada and Britain. The Pentagon said this week that a key Al-Shabaab operative connected to the Westgate mall attack, named as Adan Garar, was killed recently by a U.S. drone strike. In September, Al-Shabaab leader Ahmed Abdi Godane was also killed in a U.S. airstrike near Barawe city. Gunmen who besieged the Bardo Museum in Tunis are thought to have claimed 23 lives, most of them foreign tourists. Interior Ministry spokesman Mohamed Ali Aroui told national radio that the assailants were Islamists, but authorities haven't been more specific than that. Nine arrests have been made in connection with the attack. ISIS claimed responsibility for the attack in an audio message posted online Thursday. CNN cannot independently verify the authenticity of the audio statement. The attack occurred even as the country's democratically elected Parliament was meeting to discuss new anti-terror legislation. Up to 3,000 Tunisians are believed to have traveled to Iraq and Syria to fight as jihadists, more than any other country, according to the International Centre for the Study of Radicalization in London. The fear is that many of these fighters will return to North Africa to join ISIS-affiliated groups there and carry out attacks. Al Qaeda's North African affiliate is also a threat. In late 2012, AQIM set up a branch in Tunisia called the Uqba ibn Nafi Brigade, a 60-strong Jihadi outfit composed of Tunisians, Algerians, and some Libyans. The group, believed to include fighters driven out of Mali by French forces, has been responsible for a string of attacks on Tunisian security services in mountainous Djebel Chaambi region along the Algerian border. CNN's Tim Lister and Paul Cruickshank contributed to this report.
Islamist extremism poses a growing threat in parts of North and sub-Saharan Africa . Extremist groups operating in Africa include ISIS, al Qaeda in the Islamic Maghreb, Al Shabaab and Boko Haram .