Suspected Charlie Hebdo shooters Cherif and Said Kouachi took a strange, meandering path from a humble upbringing in France to the heart of the militant Islamist movement in the Middle East. The brothers were well known to Western authorities long before their fatal encounters with French police on the streets of Paris this week.

French authorities identified the Kouachis as the elder two of the three hooded gunmen who used assault rifles, shotguns and at least one rocket launcher Wednesday to kill 12 people at the French magazine’s headquarters in Paris. The shooters targeted Charlie Hebdo staffers over their casual depiction of the Prophet Mohammad in satirical cartoons, reportedly shouting “Allahu Akbar” as they opened fire on the victims.

The youngest alleged attacker, 18-year-old student Hamyd Mourad, surrendered to police shortly after the massacre, while the Kouachis went on the run. Over the next 48 hours, hundreds of French police officers combed Paris and the surrounding countryside for any sign of the brothers. The chase culminated Friday, when authorities cornered the brothers at a factory in the nearby industrial village of Dammartin-en-Goële, France.

The brothers had already determined their fate. A French lawmaker said the suspected shooters told police during the standoff they wanted to “die as martyrs,” according to French television station i-Tele. Security forces converged on the factory late Friday afternoon in a hail of explosions and gunfire, killing the Kouachis after a brief battle.

The French intelligence service has tracked both brothers for years. Cherif, 32, had the more notable links to militant Islam. Orphaned at a young age and raised at a foster care facility in Rennes, France, the younger brother worked as a fishmonger and delivery man when he wasn’t attending jihadist meetings, the New York Times reports.

After the United States’ 2003 invasion of Iraq, Cherif linked up with radical preacher Farid Benyettou and joined a ring of French Islamists who recruited fighters to send to Iraq. Kouachi’s association with the group was public knowledge, as evidenced by his appearance on French television in a 2004 documentary on French Muslims who were angered by Western intervention in the Middle East. By most accounts, Kouachi didn’t fit the mold of the average jihadi. The documentary portrayed him as a fan of rap music and attractive women, USA Today reports.

Cherif Kouachi was arrested for the first time in 2005, when French authorities detained him just before he could leave on a planned trip to Iraq. During his trial, Kouachi’s lawyer attempted to play up the notion that his client wasn’t a true jihadist, describing Kouachi as a regular user of marijuana and an “occasional Muslim,” the New York Times notes. He was convicted in 2008 and sentenced to prison, but was released shortly thereafter due to time served in a pretrial detention program.

There are conflicting accounts on the timeline of Kouachi’s incarceration, but he came into contact at some point with Djamel Beghal, a would-be jihadist convicted in 2001 on a failed plot against the U.S. Embassy in Paris. Beghal became Kouachi’s mentor.

Cherif Kouachi resumed his association with hardline Islamist elements after his release. He was arrested in 2010 for alleged participation in a plot to spring a militant serving a life sentence from prison. The incident also marked the first time that Cherif’s brother, Said, popped up on law enforcement's radar. Ultimately, prosecutors opted not to pursue charges against either brother, despite officially acknowledging Kouachi’s “proven roots in radical Islam.”

There is no indication that Said Kouachi was ever arrested, but authorities suspect the 34-year-old of a potential direct tie to al Qaeda. A Yemeni intelligence official confirmed Friday that he traveled to Yemen in 2011 and met with Anwar al Awlaki, a radical preacher killed later that year in a purported CIA drone strike. Al Qaeda operatives in the region trained Kouachi for months, U.S. and European sources told Reuters. He then returned to France, where he and his younger brother laid low until the attack on Charlie Hebdo earlier this week.

Given their respective ties to the jihadist movement, it’s unclear how the Kouachi brothers were able to avoid closer scrutiny. Both men have been on the U.S. no-fly list “for years,” an official told Yahoo News. A European Union watchlist contained their names as well, but they weren’t considered top priority targets.