The suspect also allegedly tried to assess possible jihadi militants for "combat duties" in Syria and Iraq or for terror activities within their respective countries of origin, a statement said.
Spain and Morocco have arrested dozens of suspected jihadi militants and recruiters in recent years, with networks often centered in Spain's north African enclaves of Ceuta and Melilla.
The arrest in Badalona, which is 12 kilometers (7.5 miles) northeast of Barcelona, took place early Saturday, the statement said.