Said Kouachi, the elder of two brothers accused of carrying out France’s deadliest terrorist attack in decades, visited Yemen in 2011 on the pretext of Islamic studies and instead linked up with the country’s al-Qaeda affiliate, meeting with a group led by American-born terrorist suspect Anwar al-Awlaki, a senior Yemeni security official said Friday.

Yemeni authorities suspect that Kouachi, who was killed Friday along with his younger brother in a police raid northeast of Paris, met with Awlaki in his ancestral village in Yemen’s southern Shabwa province, the official said, speaking on condition of anonymity in accordance with government ground rules. U.S. officials could not immediately confirm that such a meeting took place.

Awlaki was killed in a U.S. drone strike in Yemen in September 2011.

Kouachi, 34, and his younger brother, Cherif Kouachi, 32, attacked the Paris offices of the satirical newspaper Charlie Hebdo on Wednesday, slaughtering 12 people, including the paper’s editor, several staffers and two police officers, French authorities said.

Al-Qaeda in the Arabian Peninsula (AQAP), as the terrorist network’s Yemeni affiliate is known, claimed responsibility late Friday for the attack on Charlie Hebdo, which had outraged fundamentalist Muslims by publishing provocative content, including cartoons depicting the prophet Muhammad.

Cherif Kouachi, one of the suspected gunmen in the attack on Charlie Hebdo newspaper in Paris, was seen in a 2005 episode of “Pièces à Conviction” on young jihadists. Kouachi was killed Jan. 9, 2015, during a shootout with police. (National Audiovisual Institute)

Kouachi arrived in Yemen in mid-2011 during an uprising that ousted the country’s leader, Ali Abdullah Saleh, the security official said.

“We believe he came under the cover of studying among the Salafist students in the north of Yemen,” he said. “Instead, he made his way down to the south of the country” to link up with AQAP.

“We suspect that he had met with Anwar al-Awlaki in Shabwa before September that year,” the official said. Kouachi then is believed to have moved on to Abyan province, where he joined AQAP foreign militants, many of whom were Algerians, Somalis and Saudis, at a base in Jaar, which the group proclaimed as the capital of its Islamic emirate.

“It is highly possible that, during his stay there and until early 2012, he received training on how to use weapons,” the officials said. He said this would have included bombmaking, since bombing has been a main activity of AQAP in Yemen over the past few years.

In 2012, the government launched an attack on AQAP in Abyan, forcing many militants to flee, and Kouachi is believed to have been among those who left at the outset of the assault, the official said.

During that time, the government deported many foreigners who were ostensibly in the country to study Arabic or pursue Islamic studies.

“Said Kouachi was among those who were departed,” the official said.

About 7.5 percent of France's population is Muslim.

He said the government is still investigating whether Kouachi remained in touch with AQAP after he left Yemen. The official said he could not disclose any information in that regard for the time being.

Greg Miller and William Branigin in Washington contributed to this report.