ALGIERS/LONDON Inquiries into the bloody assault on an Algerian gas plant are uncovering increasing evidence of contacts between the assailants and the jihadis involved in killing the U.S. ambassador to Libya nearly a year ago.
The extent of the contacts between the militants is still unclear and nobody is sure there was a direct link between the attack on the U.S. consulate in Benghazi and the carnage at In Amenas, where 39 foreign hostages were killed in January.
But the findings, according to three sources with separate knowledge of U.S. investigations, shed some light on the connections between Al Qaeda affiliates stretching ever further across North and West Africa.
The lack of detail, meanwhile, highlights the paucity of intelligence on jihadis whose rise has been fuelled by the 2011 Arab uprisings and who have shown ready to strike scattered Western targets including mines and energy installations.
That makes the region an even greater worry for Western countries at a time of heightened security over the threat of more al Qaeda attacks in the Middle East and North Africa.
At the center of the web is Al Qaeda in the Islamic Maghreb (AQIM), which has expanded far from its Algerian birthplace and now has links to other jihadi groups in Maghreb countries, including Tunisia and Libya. Their shared ideology combines with other, often financial, interests.
"Its leaders are survivors; they are opportunists," said Stephen Tankel, an Assistant Professor at American University in Washington.
"And now the environment throughout the Maghreb has become conducive to expansion as well," said Tankel, who is writing a book on how jihadis adapted after the Sept 11, 2001 attacks on the United States.
AQIM grew from the factions that fought Algeria's civil war in the 1990s. With its central leadership hidden in the mountains of northern Algeria, it pledged its allegiance to al Qaeda six years ago as one of the poles of global jihad.
Despite being driven from large parts of the West African state of Mali by a French-led military operation early this year, AQIM militants are strengthening their presence elsewhere.
Four months after the In Amenas raid, the attack's mastermind, Mokhtar Belmokhtar - who has strained but functioning relations with AQIM's leadership - claimed responsibility for an attack on a uranium mine run by France's Areva in Niger far to the south.
Belmokhtar has also launched attacks in the past in Mauritania, while AQIM uses the centuries-old Mauritanian tradition of Islamic scholarship to give religious justification to its actions - as well as increasing its regional appeal.
With tension growing in Tunisia between opposition secularists and the Islamist government, hardline Salafists are an increasingly important part of the equation there.
AQIM is believed to be involved in fighting with the Tunisian army on the Tunisian-Algerian border, according to an Algerian security source.
At the same time, AQIM is building links with groups such as the Ansar al-Sharia Tunisia, which seeks to expand its followers through Salafist missionary work or "dawa" rather than violent jihad.
"My own take is that there is a great deal of overlap between these groups," said Daveed Gartenstein-Ross at the Foundation for Defense of Democracies and an expert on al Qaeda.
FROM BENGHAZI TO IN AMENAS
AQIM's links to Libyan groups have grown stronger during the chaos that ensued after the 2011 overthrow of Muammar Gaddafi, who had kept all Islamists in check.
Some of the men involved in the Algerian raid took part in the attack on the U.S. consulate in Benghazi on September 11, 2012, when Ambassador Christopher Stevens and three other Americans died, one source with knowledge of the inquiry said.
A second source said there had definitely been some kind of contact between the Benghazi and In Amenas attackers but could not say to what extent.
A third source said some of the jihadis at In Amenas had bought weapons and stayed for months in the Libyan city of El Aouinet near the Algerian border, where they met some of the men behind the Benghazi attack.
Speaking on condition of anonymity, the sources would not be quoted on where they got their information.
The United States has not said who was behind the Benghazi attack, though the Ansar al-Sharia Libya - a loose group of Salafists in eastern Libya - is a prime suspect. The name "ansar" means helpers.
Al Qaeda leader Ayman al Zawahiri had called for revenge attacks on Americans in Libya the day before the attack on the consulate, but there was no claim of responsibility from al Qaeda's central leadership in Pakistan or AQIM - which usually releases statements through a Mauritanian news agency.
Despite the growing suspicions of a connection between the attacks at Benghazi and In Amenas, intelligence is scant.
Security agencies have not even found out whether Libya, Mali or both countries served as the bases for the attack on the gas plant run by BP, Statoil and Algerian state-owned Sonatrach.
"These groups are so fluid and move so quickly that we can't say with any certainty where they were," said a fourth, Western, intelligence source.
Even compared to other al Qaeda groups, AQIM has shown an ability to evade intelligence services.
Terrain and geography help: The United States has only two or three surveillance drones in a region bigger than western Europe. Telling militants apart from traders and smugglers in the Sahara's rock and sand is not easy from the sky.
For Western intelligence agencies, the Sahara was never as much a focus as regions such as the Arabian peninsula or Pakistan.
Fragile African states to the south of the Sahara have limited capacity for intelligence gathering.
Algeria's more robust security services have a record of infiltrating local Islamist groups, but AQIM's increased spread has allowed it to recruit new faces unknown to the Algerians: two of the attackers at In Amenas were Canadians.
None of the security sources nor the diplomats interviewed had a clear idea as to where AQIM's forward bases were now.
Some thought they could still be in the Ifgoghas mountains in Mali's north, others that the jihadis would gravitate to Libya to buy weapons, but might avoid setting up there because the country's myriad armed factions make it too unstable for them.
"The next safe haven will be Niger," suggested one Algerian source. Countries across the region reject any suggestion that their own soil could harbour AQIM's latest desert base.
One thing intelligence services agree on is that AQIM will become a greater threat as it spreads further from its roots, rather than fragmenting.
Few experts are ready to guess where the jihadis might strike next, but with oil and gas installations across North Africa and Western-run mining and energy firms established on the Sahara's southern fringes, there is no shortage of potential targets.
(Additional reporting by Marie-Louise Gumuchian in Tripoli and Mark Hosenball in Washington; Editing by Matthew Tostevin)