Four of those arrested were allegedly connected to Yusuf Belhadj, a suspected spokesman for al-Qaida who claimed responsibility for the Madrid train bombings and who was extradited to Spain from Belgium on Friday, the ministry said.
The other detainees were allegedly connected to Sirhan bin Abd al-Majid Farkhet, known as "The Tunisian", a suspected ringleader of the 11 March attacks.
Farkhet was among seven suspects who blew themselves up in a suburban Madrid apartment on 3 April rather than face arrest.
In Friday's operation, police seized six Moroccans, three Syrians, an Egyptian, a Palestinian and an Algerian in raids that started before dawn in Madrid and its suburbs.
One of the suspects is considered Farkhet's personal assistant, the ministry said.
The operation, part of the investigation into the attacks that killed 191 people last year, remains open.
Friday's swoop brings to about 90 the total number of arrests since the attacks on four commuter trains.
Most of them are of North African origin, and 45 remain in jail or under court supervision.