At least two gunmen opened fire at the Bardo Museum in Tunis on 18 March.
Italy is now trying to work out what role the suspect played in the attack, and where he was on the day of the shootings.
Records show that Mr Touil, 22, entered Italy on a migrant boat on 16 February - a month before the Tunis murders. Concerning his arrival, Italy says it had no reason to treat him as a terrorist suspect.
"Neither the Tunisian nor Italian police considered him dangerous or at risk of terrorism," Italy's Interior Minister, Angelino Alfano, told parliament on Thursday.
Instead, Italy decided Mr Touil was an economic migrant. The Italian authorities quickly ordered him to leave the country. But they did not manage to enforce the order. In itself, that is not unusual. Migrants are not held in detention centres, making it easy for them to disappear from the system.
How big is Tunisian militant threat?
Tunisia attacks: Survivors' stories
So it appears that Italy simply lost track of Abdelmajid Touil. His family insists that he stayed in the country, and joined his mother in the town of Gaggiano in northern Italy.
Documents show that he took Italian language classes at a local learning centre. The register shows that he was in class on 16 March - two days before the Tunis attack.
"He was a student here," teacher Flavia Caimi told Italian reporters. "We know his mother too. They [the authorities] can't say he was in Tunis on the day of the attack, unless he flew there and back."
But flying from Italy to Tunisia - and back - without valid papers would have been extremely difficult.
Abdelmajid Touil's mother Fatima insists that he was with her in northern Italy on 18 March - the day of the Tunis attack. She says they watched TV coverage of the shootings together.
"My son does not agree at all with jihad, with armed struggle," she told Italian media. "This is a mistake. We're sure that the truth will come out."
But family proof that Mr Touil was in Italy on the day of the attack will not be enough to exonerate him.
The Tunisian government has accused a network of more than 40 people of helping at least two gunmen to plan and carry out the actual attack. Tunisia may argue that Mr Touil was part of this wider support network.
It is not yet clear whether or not Mr Touil's arrest will force Italy to reassess its screening procedures for incoming migrants. So far this year, around 30,000 migrants have arrived by boat. The government insists it is aware of the potential dangers the country faces.
"I never ruled out the fact that Italy could be under risk of terrorism," Angelino Alfano told MPs, "I've always said that the alert is very high, including the use of boats to smuggle terrorists, even if we have no evidence of this."
Italy's anti-immigration Northern League party prefers not to wait for evidence.
"What must happen for something to be done about this?" asked Matteo Salvini, the Northern League's leader. "A terrorist attack? [Interior Minister] Alfano should quit," he added.
On 19 May Italy arrested Abdelmajid Touil from Morocco, on suspicion of involvement in an attack on foreign tourists in Tunis that left 22 people dead.