The sites, which included the official websites of the Constitutional Court and the economy and foreign ministries, went offline on Monday and could still not be accessed by early evening.
Anonymous, a loosely knit group that has attacked financial and government websites around the world, said it orchestrated the shutdowns.
“Hey Spain, we see that you are still hurting the Catalan people. This is not a joke. We will hurt your government as well!,” the group wrote in a statement posted on its Twitter feed.
— Nama Tikure (@NamaTikure) August 19, 2018
Anonymous temporarily blocked the Constitutional Court's website in October 2017 just as Spain's central government prepared to announce unprecedented measures to seize powers from Catalonia's regional government over its threat to break away from the rest of the country.
The hacker group originated in 2003, adopting the Guy Fawkes mask as its symbol. The mask is a stylised portrayal of an oversized smile, red cheeks and a wide moustache upturned at both ends.