Spanish police have arrested two Moroccan men for allegedly serving as recruiters for the Islamic State group.

Spain's Interior Ministry said police arrested one man in Madrid and the other in the town of Roda de Ter near Barcelona on Saturday.

Spanish authorities say the pair allegedly "focused on the recruitment of young Muslims" with the goal of "inciting the execution of terrorist acts."

Police say the two suspects used social media to spread IS propaganda that included "videos of violent acts chosen to justify the cruelty shown toward the victims."

Spain says 163 suspected Islamic extremists have been arrested in the country since 2015.