BARCELONA, Spain — Spain’s top court ruled Tuesday that a recent independence referendum in Catalonia was unconstitutional, adding legal weight to the government’s efforts to block an attempt by the wealthy region’s leaders to break away from the rest of the country.

Armed with that Constitutional Court ruling, Prime Minister Mariano Rajoy’s conservative government is in a stronger position to potentially strip Catalonia of its self-government, or parts of it, for disobeying the law. The court’s ruling wasn’t surprising – Spain’s government had repeatedly insisted the vote was illegal.

But regional leaders defied the Madrid-based central government and went ahead with the Oct. 1 referendum on whether the region should separate from Spain. They say the “Yes” side won and that the result gave the region a mandate to declare independence.

Despite the Constitutional Court’s decision, the supporters of secession in Catalonia showed no signs of giving up. They have portrayed the central government as repressive.

“We are facing an executive power in the state that uses the judiciary branch to block the legislative,” Catalan government spokesman Jordi Turull told reporters shortly after the ruling was announced.