The ring made the counterfeit items in illegal factories in northern Portugal and then shipped them across the border by van to Xinzo de Limia, a city of around 10,000 people in northwestern Spain, the interior ministry said in a statement.
"The network, of Moroccan origin, had 'regional delegates' across Spain who distributed over the past two years 235 tonnes of fake garments and footwear, generating revenues of €5.5 million ($7.5 million)," it said.
"Part of this black money was hidden along with bank cards and other financial documents belonging to the organization in the mosques of Ourense and Xinzo de Limia," it added.
Among those arrested was the imam of the mosque of Xinzo de Limia, whom police said was one of the leaders of the ring. The mosque received nearly €100,000 in donations from the ring.
The imam at the mosque in the nearby city of Ourense was also detained as part of the operation. His name appears on bank accounts used by the group and police suspect him of helping to launder money earned by the ring.
Police searched over 117 locations across the country, including the two mosques, as part of their investigation, which was launched in September 2012 and carried out in cooperation with Portuguese authorities.
Police seized just over one million items of counterfeit clothing, as well as bank cards, several weapons and software containing the logos of over 200 registered brands.
Police also closed 10 illegal factories in northern Portugal where the fake goods were made.
The operation "dismantled the main network which manufactured and distributed counterfeit clothes in the Iberian Peninsula", the statement said.
The authorities detained 65 people in Spain and 34 in Portugal. The arrested include 37 Senegalese nationals, 34 Portuguese citizens, 19 Moroccans and nine Spaniards.