Groups such as al Qaeda, the Islamic State group and Boko Haram have been wreaking havoc in much of the world in recent years. Pictured: Islamic State group militants lead what are said to be Ethiopian Christians along a beach in Wilayat Barqa, Libya, in this still image from an undated video made available on a social media website on April 19, 2015. The video purportedly made by Islamic State and posted on social media sites appeared to show militants shooting and beheading about 30 Ethiopian Christians in Libya. Reuters

Do you know your Boko Haram from your Islamic State, your al Qaeda from your al-Shabab? Keeping track of who’s who in the world of militant groups can be a challenge.

Allegiances shift, alliances are made and broken, new enmities bloom and wane -- sometimes it’s hard to distinguish a dispute between One Direction and The Wanted from a feud between al Qaeda and the group commonly called ISIS.

What’s the difference between a boy band and a rebel band? Both groups are populated by passionate young men eager to make their mark, both seek stardom and acclaim, both think fame will gift them with young virgins.

But only one is likely to settle their spat with an AK-47 -- or enslave hundreds of women and children.

yazidis (2)
Displaced people of the minority Yazidi sect, fleeing violence from forces loyal to the Islamic State group in Sinjar town, walk toward the Syrian border, on the outskirts of Sinjar mountain, near the Syrian border town of Elierbeh in Al-Hasakah governorate Aug, 11, 2014. Reuters/Rodi Said

So here’s our handy guide:

Boko Haram

Let’s start with Boko Haram -- the terrorist group that’s been wreaking havoc in Africa’s most populous country. The Nigerian militants are responsible for a six-year campaign of targeted bombings, assassinations and abductions, killing 50 Friday alone. The group’s name can be translated as “Western Education Is Forbidden,” and it’s since become infamous for kidnapping hundreds of schoolgirls as well as a vicious insurgency that’s claimed the lives of thousands.

More recently, it’s rebranded, swearing allegiance to ISIS and renaming itself the Islamic State’s West Africa Province. In March, an audio message by an Islamic State group representative announced that Boko Haram’s pledge had been accepted by the militant group’s leader, Abu Bakr al-Baghdadi, and went on to congratulate “our jihadi brothers” in West Africa.

“It’s been a courtship that has been a long time coming,” J. Peter Pham, director of the Africa Center of the Atlantic Council, an international-affairs think tank based in Washington, said in an interview with International Business Times. “It’s as close to a marriage of equals as we’ve ever seen.”

The alliance grants Boko Haram legitimacy in the world of Islamic extremism -- a world where recruiting, funding and marketing are as important as in any corporation.

Islamic State group videos often feature jihadi songs. Supporters of the militant group confirmed via Twitter that its lead songwriter was killed by an airstrike in eastern Syria last weekend. AFP/Getty Images

Islamic State/ISIS

Possibly the most notorious, and diabolical, of all Islamist groups, the Islamic State group started from humble beginnings as an offshoot of al Qaeda in Iraq more than a decade ago. In 2006, it rebranded as ISIS. Nine years later, the militant group has seized territory stretching from northern Syria to central Iraq and its former allies have disowned it. After months of feuding, al Qaeda formally announced its separation from the group in February 2014.

A statement by al Qaeda general command declared that the Islamic State group “is not a branch of the al Qaeda group ... does not have an organizational relationship with it and [al Qaeda] is not the group responsible for their actions.”

Al Qaeda

Al Qaeda is the granddaddy of terrorist groups. Founded by Osama bin Laden in the 1980s and responsible for the Sept. 11, 2001, attacks on America, the group’s goal has always been to establish an independent Islamic state across the Middle East and reject any political or social activity associated with Western society. Since the Islamic State group has taken center-stage, al Qaeda has concentrated more on its affiliates in the region.

Al Qaeda
A member of al Qaeda's Nusra Front climbs on a pole to hang the Nusra flag as others celebrate around a central square in the northwestern city of Ariha, after a coalition of insurgent groups seized the area in Idlib province May 29, 2015. Reuters/Khalil Ashawi

Nusra Front/AQAP/AQIM/Al-Shabab

It’s difficult to keep tabs on the many acronyms of different militant groups. The groups above are listed together because they’ve all sworn allegiance to al Qaeda.

Nusra Front: Also called al-Nusra. The rebel group first formed to fight against Syrian President Bashar Assad, and it’s still battling in that country’s civil war.

AQAP: Al Qaeda in the Arabian Peninsula. The group, based in Yemen and Saudi Arabia, claimed responsibility for the attack on the Charlie Hebdo magazine headquarters in Paris last January, and it’s since been keeping busy in Yemen’s continuing conflict.

AQIM: Al Qaeda in the Islamic Maghreb. Operating in the Sahara and Sahel region of Africa, the group traces its origins to the Algerian Civil War in the 1990s, receiving most of its funding from drug smuggling and human trafficking.

Al-Shabab: Al Qaeda’s Somali brothers, operating a brutal insurgency against the country’s internationally recognized government in Somalia’s capital Mogadishu. The group’s members are known to target Christians and were responsible for Kenya’s mall attack in 2013.

Taken together, these groups have succeeded in terrorizing civilian populations around the world. To know them is not to condone them -- but understanding how they work is essential to learning how to undo them.