Spain's Interior Minister Juan Ignacio Zoido, who was visiting his counterpart in the Moroccan capital, Rabat, on Tuesday, said security services in that country had arrested two people.

"Thanks to permanent contact and collaboration between the two countries, Moroccan security services have carried out two arrests here in Morocco linked to the attacks in Barcelona and Cambrils," he said.

The main suspects in the attacks on August 17 and 18 were of Moroccan origin, although most had been in Spain for many years.

It is understood that the two men were arrested separately, one in the city of Casablanca and the other in the city of Oujda.

Read more: Barcelona hopes attacks won't dent appeal

Zoido was in Rabat to talk to Moroccan Interior Minister Abdelouafi Laftit about the investigation into the attacks. The first attack, using a truck in Barcelona's busy Ramblas district, killed 14 people in all.

The second, which involved a car plowing into pedestrians in the resort town of Cambrils, killed two.

Explosive butane

The cell involved in the attack had collected about 120 canisters of butane in a house in the town of Alcanar, south of Barcelona.

It's believed the group accidentally ignited the gas on August 16 - the night before the Barcelona attack - destroying the house where they were staying.

Spanish police say this may have led to a change of plan, with a number of the men deciding to drive vehicles into pedestrians in the two separate events.

Read more: Terror attacks leave Barcelona and Madrid at odds, as ever

Six of the attackers were shot dead by police while another two died in the explosion, including Imam Abdelbaki Es Satty who was identified as the likely leader of the terror cell. Four other people were arrested, although two were later released.

Morocco's Laftit warned of the potential for "uncontrolled mosques" and "extremist imams" to radicalize members of Europe's Moroccan diaspora.

"The children of second and third generation Moroccan immigrants who were born in European countries need particular attention [if they are to] escape the clutches of terrorism," he said.

rc/cmk (AFP, Reuters)