They say the suspects are a Turk and two men possibly of Chechen origin, and were held in two Spanish towns.
They are thought to have been planning an attack in Spain. It is reported to be the first time such suspects have been found with explosives.
Interior Minister Jorge Fernandez Diaz is expected to give details soon.
Police suspect at least one of those arrested has attended training camps in Pakistan, reports say.
Al-Qaeda in the Arabian Peninsula had issued a message at the beginning of July looking for Spanish-speaking “lone wolves” as operatives, according to Spain’s El Pais newspaper.
Two of the suspects were travelling in a bus towards France when they were arrested in a lay-by at Valdepenas by a police special operations group, according to El Pais.
The Turkish man was reportedly arrested in a flat near La Linea de la Concepion where the group was storing explosives.