Al-Qaeda in the Land of the Islamic Maghreb (AQIM), to give its full name in English, has its roots in the bitter Algerian civil war of the early 1990s, but has since evolved to take on a more international Islamist agenda.
Its reach has also expanded across the Sahel region south of the Sahara Desert, attracting members from Mauritania, Morocco, Niger and Senegal as well as from within Mali where, in alliance with other Islamists, it is fighting French troops on the ground.
During the Mali crisis, its fighters have dramatically increased their profile, allowing them to further their aim of spreading Islamic law and jihad across West Africa.
AQIM's influence over other nascent Islamist cells comes from its wealth: it is one of the region's best-armed groups thanks to the money it makes from kidnapping Westerners and drug and cigarette trafficking across the Sahara.
It emerged in early 2007, after a feared militant group, the Salafist Group for Preaching and Combat (GSPC), aligned itself with Osama Bin Laden's international network.
Back in the 1990s, against a background of Islamist political groups testing their strength across North Africa, the military-backed authorities in Algeria at first permitted the Islamists to play a full part in the nation's political life.
But then, when the Islamic Salvation Front was poised to sweep the board in a 1992 general election, they annulled the whole process and took power back.
The political ferment immediately moved into violence.
Armed Islamists mounted attacks across Algeria, the security forces fought back; and sometimes it was hard to tell which group had carried out which atrocity.
Other states in the region - Tunisia and Morocco, Mauritania to the west and Libya to the east - also battled against Islamists.
But the conflict in Algeria was particularly brutal, killing perhaps 150,000 people. It peaked in the 1990s, until an amnesty offer to Islamists in 1999 led to gradual improvements. Violence fell and the country's economy recovered during the early years of the 21st Century.
However, the most feared of the militant organisations, the Armed Islamic Group or GIA, rejected the promised amnesty and continued a violent campaign to establish an Islamic state.
By then it had split, with the most extreme faction calling itself the Salafist Group for Preaching and Combat - a name which echoed an Islamist group in Morocco. The Arabic word "Salafist" means fundamentalist, in the sense of going back to the original texts of Islam.
In September 2006 the GSPC said it had joined forces with al-Qaeda, and in January 2007 it announced that it had changed its name to Al-Qaeda in the Islamic Maghreb to reflect its new allegiance.
At the time there had been much debate in intelligence circles about the significance of the move. Some officials dismissed it as an act of desperation by a group on its last legs, seeking to attract new recruits by aligning itself with Osama Bin Laden.
Others, who saw it as far more worrying development, proved correct, as al-Qaeda has succeeded in persuading North Africa's Islamist extremists to take a more global view. In fact, the head of the US Africa Command said he believed that in 2012 AQIM, Nigeria's Boko Haram and the Somali Islamist group al-Shabab were co-ordinating their efforts.
The merger announcement delighted al-Qaeda's then deputy leader Ayman al-Zawahiri, who described it at the time as "a source of chagrin, frustration and sadness" for Algeria's authorities.
Wave of attacks
Shortly afterwards, seven bombs exploded in Algeria's eastern Kabylia region, killing six people, and in April 2007 at least 30 people were killed in bomb attacks on official buildings in Algiers. AQIM said it had planted the bombs.
More attacks followed: on buses carrying foreign oil workers; on American diplomats; on soldiers; and in September 2007, a suicide bomb attack in Batna, aimed at the motorcade of President Abdelaziz Bouteflika. The president was not injured, but 20 people were killed.
Two days later, a car bomb killed more than 30 people at a coastguard barracks in the town of Dellys. In December, twin car bombs claimed by AQIM killed at least 37 people in Algiers, including 17 UN staff.
The death toll continued to mount in 2008.
Back-to-back attacks on 19 and 20 August killed dozens of people. The first was a suicide car bombing at a police college in Issers, east of Algiers, killing 48 people. A day later, two more car bombings struck in quick succession in Bouira, south-east of Algiers. The second explosion in Bouira killed 12 Algerian employees of the Canadian engineering firm SNC-Lavalin.
The attacks continued into 2009, when suspected al-Qaeda militants in February killed nine security guards who were working for the state-owned gas and electricity distributor Sonelgaz at a camp near Jijel, east of Algiers.
Algerian Islamists represent the largest national grouping in al-Qaeda, according to Jill Carroll's 2007 briefing paper How Did Al-Qaeda Emerge in North Africa?
'Years of hardship'
Abdelaziz Belkhadem, Algeria's prime minister in 2007, warned that the bombers wanted to take the North African country back to "the years of hardship". But other incidents across the Maghreb pointed to the group's regional ambitions.
In January that year, 12 people were shot dead by the security forces in Tunisia near the small town of Solimane, south of the capital, Tunis.
The authorities initially described their adversaries as criminals but later admitted that the men were Islamist militants with connections to the GSPC.
Meanwhile, Morocco's security forces clamped down on several militant cells - arresting, trying and jailing their leaders - after four incidents blamed on al-Qaeda-inspired groups in 2007.
The security forces were said to be on the lookout for militants who were believed to be crossing into Morocco from Algeria.
And of course the Madrid train bombs, which killed almost 200 people in 2004, were the work of a Moroccan gang.
In December 2008, AQIM militants abducted the United Nations special envoy, Robert Fowler, and his assistant, Louis Guay, near Niger's capital, Niamey. They were released in April 2009.
The group also seized four European tourists who disappeared in January 2009 along the Mali-Niger border. Two were freed in April.
The group threatened to kill one of the remaining pair - a Briton - unless a radical Islamic cleric convicted of terrorism in Jordan, Abu Qatada, was released from jail in the UK.
And in June 2009 the British government said it believed AQIM's claims on an Islamist website that the death threat had been carried out against the British captive, Edwin Dyer.
In July 2010 AQIM said it had killed French hostage Michel Germaneau - kidnapped in northern Niger three months earlier and transferred to Mali - in revenge for the killing of seven comrades in a failed rescue raid.
In November 2011 a German was killed and three other foreigners kidnapped by AQIM in the ancient tourist city of Timbuktu in northern Mali.
The group is thought to have between 600 and 800 fighters spread throughout Algeria and Europe - and according to the independent think-tank the Council on Foreign Relations, most of its major commanders trained in Afghanistan.
Since 2004, the leader of the militants is thought to be Abou Mossab Abdelwadoud, a former university science student and infamous bomb-maker.
In 2005, deputy GSPC leader Amari Saifi was sentenced to life in prison by an Algiers court for kidnapping 32 European tourists in 2003.
The former paratrooper was captured by Chadian rebels in mysterious circumstances and passed on to Libya before standing trial in Algeria.
Another leading member was Mokhtar Belmokhtar, known as "The One-Eyed", a former soldier and infamous cigarette smuggler at the centre of the 2013 hostage drama in Algeria. He left AQIM in late 2012 after falling out with some leaders and has been involved in operations in Mali.
He organised the importation of arms for the underground network from Niger and Mali. He is wanted in Algeria on terrorism charges.