There was no public claim of responsibility for the bombings. But in statements, Spain's political leadership blamed ETA, the Basque separatist organization, which has waged a campaign of bombings and assassinations for decades in pursuit of independence for the Basque region of northeast Spain. ETA remains on the U.S. State Department's list of terrorist organizations.
"It is absolutely clear that the terrorist organization ETA was seeking an attack with wide repercussions," Spain's Interior Minister Angel Acebes told a news conference, dismissing speculation that any other group could be involved. While offering no proof, he said Spanish authorities disrupted an ETA plot to place explosives on trains in December.
"Any attempt to divert attention from those responsible for the attack is intolerable," he added.
OK, so the government says it is Basque separatists. However:
ETA has never been able to mount an attack of this scale, however. And Arnoldo Otegi, the head of the outlawed Batasuna party, the political party connected with ETA, went on the radio Thursday to declare that Islamic extremists, rather than ETA, were responsible.
It's interesting to see how the government's official stetement serves their purposes - after all, any separatist group needs to be discredited, from their perspective, to ensure the contiguity of the existing Spanish state.
However, the political wing of the Basque separatist movement is trying to blame Islamists, the world's bogeymullah. Why? If the Basque separatists are unified, you'd expect that they would try to force the Spanish government to their will by terror, and thus it is in their interests to use terror as a blackmail tool. Namely, claim credit for the bombing.
I suspect that since the outlawed political party "connected" to the separatist movement is distancing themselves, however, this reveals some kind of rift between the violent arm and the political one. It's possible that Batasuna is trying to overcome being outlawed and move towards mainstream acceptability, following the strategy of Sinn Fein. The violent fanatics at the left end of the separatist movement however are probably not happy with that long term and nuanced approach.
I did some cursory research on Google about the Basque, since I know essentially nothing about them. I found this Slate Explainer about the differences in language and some historical info (incomplete). A much better resource was Wikipedia's entry on Basque nationalism, which points out that the Basque movement was seeded after revocation of special civil codes for the Basque minority (akin to the Islamic civil codes in India), and triggered into outright conflict by the dictatorship of Francisco Franco. Interesting lesson for India under an ascendant BJP, I think.