After a referendum declared illegal by the courts, the Catalan Parliament declared independence, forcing Madrid to assert direct control of the region.
It's had increasingly antagonistic relations with the EU especially over the rule of law and and also mass protests of issues like abortion, which the conservative ruling party had all but outlawed.
The outlawed Tehrik-e Taliban Pakistan group, or TTP, claimed responsibility Saturday for the police station attack a day earlier and for killing the officers.