In the end, it was a combination of computer forensics and a tip from the public that led police to the doorstep of the suspect in the series of shootings that had terrorized southwest France.
The mysterious gunman had left a trail right after the first attack, 10 days ago, when a paratrooper was shot dead in Toulouse.
However, it was only after cross-referencing that clue with other information that investigators were able on Monday afternoon to identity a suspect, Interior Minister Claude Guéant told BFM television.
By that time, the scooter-riding gunman had killed two other soldiers, then shot his way into a Jewish school and murdered a rabbi and three children.
It began on Feb. 24, when the first victim, Staff Sergeant Imad Ibn-Ziaten, a paratrooper of Moroccan origin, had placed a classified ad on the Leboncoin.fr website to sell his Suzuki 650 Bandit motorcycle.
The ad alluded to Staff Sgt. Ibn-Ziaten’s status as an enlisted man.
The afternoon of March 11, Staff Sgt. Ibn-Ziaten rode his motorcycle to a gym parking lot, apparently to meet a prospective buyer.
Instead, someone shot him in the head. Witnesses saw a suspect fleeing the scene on a scooter.
Four days later, a gunman ambushed a group of uniformed paratroopers lining up at an outdoor automated teller in Montauban, 50 kilometres north of Toulouse.
He killed two soldiers of North African ancestry, Corporal Abel Chennouf and Private First Class Mohamed Legouad, and seriously wounded Guadeloupe-born Corporal Loïc Liber.
Again, witnesses said the gunman, whose face was hidden by a helmet, rode away on a scooter. Both attacks had been carried out with the same .45-calibre handgun.
Though the scooter model wasn’t immediately made public, it appears investigators knew it was a Yamaha because they began questioning local dealerships.
One of those people interviewed was Christian Dellacherie, director of Yam31, a Yamaha dealership just 10 minutes from the scene of the standoff. Mr. Dellacherie was of no immediate help, however,
Because the victims were a black Caribbean and three Arabs, police at one point checked the whereabouts of three members of the same paratrooper regiment who had been disciplined in 2008 for neo-Nazi sympathies.
On Monday, the gunman struck again, at the Ozar Hatorah school in Toulouse. He killed Rabbi Jonathan Sandler and his two sons, Gabriel and Arieh, ages 3 and 6. He also killed Miriam Monsonego, 7, chasing after her, grabbing her by the hair and firing at her head.
By that afternoon, however, investigators had a suspect.
Mr. Guéant said police had scrutinized the 575 Internet Protocol (IP) addresses of users who had browsed Staff Sgt. Ibn-Ziaten’s online ad.
One IP address was linked to the mother of Mohammed Merah, a man who was already known to police and intelligence services.
The man, who had a record for violent crime in France, had travelled to Pakistan and Afghanistan and was suspected of having radical views, Mr. Guéant said.
Another investigative track emerged after the French media reported Tuesday that police were on the lookout for the suspect's Yamaha T Max 530 scooter, which might have been repainted because witness accounts of its colour conflicted.
That detail jogged Mr. Dellacherie’s memory, and he contacted police.
He recalled that a customer had visited recently and asked an employee whether repainting his scooter would disable its anti-theft tracking device.
The customer also asked how the tracker could be turned off but the employee wouldn’t tell him.
State prosecutor Francois Molins later said the customer was one of Mr. Merah's brother, Abdelrazik.
By Tuesday evening, Mr. Guéant said, there was enough evidence to authorize the arrest of Mr. Merah, his brother and his mother.