The two men, who were arrested in separate operations in northern Spain, were both "fully integrated" into the infrastructure of the jihadist group and were "encouraging terrorist acts," the statement said.
It was not immediately clear if the two were in touch with each other, but both had clearly expressed support for IS in online postings which were "clearly laid out for mass appeal" and videos which were "extremely radical and shockingly crude," the statement said.network".
One of the men, a Spanish national of Moroccan origin who was arrested in the northern port city of Gijon, had sworn loyalty to IS chief Abu Bakr al-Baghdadi and was in touch with "IS members and leaders" through a large, secure network he had created.
The other, who was arrested in the Basque resort of San Sebastian near the French border, was also actively recruiting "within radical jihadist circles" in his area, notably focusing on "those at risk of social exclusion", the statement said.
It was not immediately clear when they were arrested but the two operations were coordinated by the Audiencia Nacional, Spain's national criminal court which has responsibility for terror-related issues.
Two weeks ago, the interior ministry said four Spaniards and a Moroccan had been arrested in Spain, Belgium and Germany for online propaganda and IS recruitment through a Facebook page called "Islam in Spanish" which was followed by 32,500 people.
Earlier this month, police arrested a 38-year-old man in Manresa near Barcelona who was posting jihadist propaganda on social networks along with pictures of himself posing with weapons, although they later confirmed he had no ties to any "terrorist groups".
Ministry figures show that since 2015, the security forces have arrested 120 jihadists.
The last major jihadist attack on Spain was in 2004 when militants linked to Al-Qaeda set off a dozen shrapnel-filled bombs on four commuter trains in Madrid, killing 191.