French authorities were under pressure on Friday to explain how a network of Islamic extremists already known to intelligence services and with possible links overseas was able to carry out the deadly attack on the French satirical magazine Charlie Hebdo earlier this week and the hostage taking at a kosher supermarket in Paris.

The core of the network was a cell established in 2003 to send volunteers to Iraq to fight alongside an al-Qaida affiliate there which was broken up by police in 2005. Other members met in detention where they were further radicalised by a veteran militant once based in the UK.

Several members had been put under surveillance in 2010 when intelligence services discovered what appeared to be a plot to break out a militant leader from prison. Hayat Boumedienne, 26, the girlfriend of the suspected Hypercacher hostage taker Amédy Coulibaly, 32, was questioned by police in the same year, according to Le Monde newspaper.

American officials have also said that Saïd and Chérif Kouachi, the two gunmen who stormed the magazine offices on Wednesday killing 12 and who died on Friday, had been on a US terrorist watchlist for years and one had travelled to Yemen, possibly for training with al-Qaida in the Arabian Peninsula (Aqap), four years ago.

On Friday night a member of al-Qaida’s branch in Yemen claimed that the group directed the attack against Charlie Hebdo “as revenge for the honor” of Islam’s Prophet Muhammad.

“The leadership of Aqap directed the operations and they have chosen their target carefully as revenge for the honor of the prophet,” the al-Qaida member said in an English statement to Associated Press. He said France was targeted “because of its obvious role in the war on Islam and oppressed nations.”

British sources confirmed on Friday that the Kouachi brothers were also on a UK terror watchlist. Police and the security services are investigating whether they or their cell have links to the UK.

Aqap has a history of launching ambitious international terrorist operations. Both of the Kouachi brothers had been flagged in a US database as terrorism suspects, and were also on a no-fly list, meaning they were barred from flying into the US, American officials said.

Cherif Kouachi in 2004 French TV footage

Guardian

The possibility of a link to Aqap, a largely autonomous affiliate of the original al-Qaida, was raised only hours after the attack on Charlie Hebdo on Wednesday.

One witness reported hearing the gunmen mention al-Qaida. Another said one had told him to “inform the media we are from al-Qaida in Yemen”.

Aqap has been based in Yemen since 2009, when groups there and in neighbouring Saudi Arabia merged. There has been a steady stream of young Frenchmen heading to Yemen to learn Arabic and study Islam for many years.

One official told Agence France-Presse that, according to French intelligence, Saïd, the older of the two Kouachi brothers, travelled to Yemen in 2011, where the 34-year-old received training in small arms combat and marksmanship.

A senior Yemeni intelligence source told Reuters that Saïd Kouachi met leading Anwar al-Awlaki, a well known extremist preacher in Aqap during a stay in Yemen in 2011.

Awlaki’s fluent English, grasp of contemporary western culture and ability to condense esoteric theological debates into simple arguments made him was one of the best known international extremist propagandists. The Yemeni-American dual-national citizen was blamed for the radicalisation of militants in the US, the UK and elsewhere. He was killed by a suspected US drone strike in October 2011.

The Yemeni source told Reuters that the older Kouachi was among a number of foreigners who entered the country for religious studies.

“We do not have confirmed information that he was trained by al-Qaida but what was confirmed was that he has met with Awlaki in Shabwa,” the source said, a lawless area where al-Qaida militants and the security forces have clashed in recent years. It was under al-Qaida’s control in 2011.

French police and intelligence services were heavily criticised in 2012 after a 23-year-old French Muslim who had recently returned from Pakistan and Afghanistan went on a 10-day shooting spree, killing seven people. Mohammed Merah is thought to have trained while overseas and possibly fought with the Taliban.

Though little is still known of Saïd Kouachi, information about Chérif’s links to other extremists has become clearer.

People place tributes outside the Charlie Hebdo offices in Paris on Friday for the victims of the shootings. Photograph: Jacques Demarthon/AFP/Getty Images

These include Djamal Beghal, a jailed militant described by Le Monde as Chérif’s mentor. Beghal was a key extremist organiser in the UK in the late 1990s and was connected to Abu Qatada, the London-based radical preacher deported after a long legal fight to Jordan in 2013.

Beghal, jailed in France for 10 years in 2001 for planning to bomb the US embassy in Paris, was frequently seen at the Finsbury Park mosque in north London.

In about 2003, Chérif had became involved in a group known as the Buttes-Chaumont network, which sent about a dozen French fighters to fight under the brutal Abu Musab al-Zarqawi, then leader of al-Qaida in Iraq. The network was broken up by French authorities in 2005. Al-Zarqawi was killed a year later.

However one former member of the group recently surfaced in Tunisia, where he is believed to have killed a politician. Others fought in Iraq alongside a militant called Salim Benghalem who has now reappeared as a fighter and alleged executioner with the Islamic State (Isis) in Iraq and Syria.

Investigators are still trying to untangle this complex web of active extremists. Some experts have suggested that Benghalem acted as an intermediary between Isis, which recently called on individuals in Europe to mount violent attacks, and the Kouachi brothers.

Isis has publicly welcomed the attack on Charlie Hebdo.

Flags found in the car abandoned by the Kouachi brothers indicated an allegiance, though not necessarily any organisational connection, to either Aqap or Isis.

However, if there are external links, it now appears more likely they will lead to Aqap, though an armed assault on a magazine would be a new departure for a group which has previously based its strategy on the bomb-making ingenuity of senior members.

One Aqap operation involved a Nigerian man, Umar Farouk Abdulmutallab, who tried to down a Detroit-bound airliner on 25 December 2009 with a bomb concealed in his underwear. Another saw two air freight packages containing bombs sent to the United States in October 2010.

Reuters quoted western intelligence officials saying that after Saïd Kouachi returned to France from Yemen, both brothers appeared to have avoided any activities that might have drawn the attention of French security and law enforcement services.

This may explain why the two men were not treated as priority targets by French counter-terrorism agencies. However the lack of surveillance of such a wide-ranging network with such a long history of activism and connections to well known militants inside and outside France indicates a significant failure.