MADRID (Reuters) - Spanish police on Friday detained a man they said had a close relationship with a number of those involved in last month’s attacks in Barcelona when militant Islamists used a van to hit pedestrians and carried out a follow-up attack, killing 16.

The Moroccan man, 24, is a resident in Spain and had connections to the Islamist cell which took part in the attack, especially the imam Abdelbaki Es Satty, the Interior Ministry said in a statement.

Police are looking at the man’s part in the acquisition of materials, specifically hydrogen peroxide, which was used in the manufacture of some 100 kilos of TATP explosives, the ministry said.

The cell had accumulated around 120 canisters of butane gas at a house in a town south of Barcelona with which, police said following the attacks, it had planned to carry out a larger bomb attack.

A blast that destroyed the house in the town of Alcanar on Aug. 16, the eve of the Barcelona attack, was accidentally triggered by the cell, police say. Satty, said to be the leader of the militant group, died in the explosion.

Six of the suspects were killed by police during the attacks and four have been arrested, with two held in prison.

Spanish police have arrested 201 people they claim are associated with militant Islamists since raising the alert level to 4, the second highest, in June 2015.