RIPOLL, Spain—An imam in northeastern Spain emerged as a prime suspect in the investigation of the terror attack in Barcelona as Spanish authorities look into whether he radicalized a group of young men and plotted with them to launch an even deadlier assault.

Spanish authorities said Sunday they are looking into Abdelbaki Es Satty in connection with the attack Thursday, when a terrorist drove a van into a crowd in central Barcelona and killed 13 people. Mr. Es Satty, a Moroccan national, was the former imam at a mosque in Ripoll, the hometown of most of the 11 others police suspect of involvement.

Josep Lluís Trapero, police chief in Catalonia, said investigators believe that the cell may have been conspiring for more than six months to carry out one or more bombings in Barcelona, but was aborted when gas canisters being used to build bombs exploded.

A spokeswoman for the Catalan police said Mr. Es Satty may have died in that blast, which took place in a tiny town 190 miles from Barcelona and reduced a house to rubble. Police are trying to identify charred human remains there.

At the site, “we found materials for explosives that are similar to the ones usually used by Daesh,” or Islamic State, Mr. Trapero said. The terrorist group has claimed responsibility for the attacks.