Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — When a gunman killed four people at a Jewish museum in Brussels in 2014, police in Spain launched an effort to reduce the number of illegal firearms circulating in Europe.

What they found was a arsenal large enough to supply an army — and all ready to be sold to terrorist groups and gangs.

Mountains of firearms recovered by police in Spain. Spanish national police

Spanish police announced Tuesday they had recovered around 10,000 assault rifles, pistols, machine guns, and revolvers, as well as 400 shells and grenades, in raids in the north of the country.

They also arrested five suspects and recovered around $90,000.

The raids, in Girona, Biscay and Cantabria, targeted a gang trafficking firearms on the black market that were destined to be sold to terror groups and gangs in Spain, France and Belgium.

The firearms were destined to be sold to terror groups or gangs in Spain, France and Belgium. Spanish national police

Spain's national police, who worked with cross-border authority Europol on the operation, said the gang "exploited legal loopholes and legislative differences between E.U. countries to divert guns from legal suppliers." They used a workshop to re-brand and reactivate the weapons, which were "being made ready for sale to terrorist groups and organized crime," police said.