Under Spain's constitution a region "cannot unilaterally call a referendum on self-determination to decide on its integration in Spain", according to a written summary of the ruling released by the Constitutional Court.
It ruled "unconstitutional and null" a declaration by the Catalan regional parliament which claimed Catalonia had a sovereign right to hold a vote on its future. The court upheld a legal challenge by the national government to that declaration and said any "right to decide" by Catalans could only be exercised in accordance with Spain's 1978 constitution, which insists on the unity of Spain. Spain is Indivisible according to the consititution.
Mariano Rajoy vowed to block the vote, which the Catalan authorities intend to hold on 9 November. Both Spain's ruling conservative party and the Socialist opposition have long stated their rejection of a referendum. But in recent months, the Catalan regional government has vowed to press ahead even without Madrid's blessing.
Mr Rajoy told the Spanish parliament during the annual state of the nation debate that "this referendum can't take place, it is not legal". He added: "It is the entire Spanish people who have the capacity to decide what Spain is."
Tensions between the Spanish government and Catalonia's regional government have been rising in recent months. Catalan's regional government announced in December that it had decided on the two questions that would be put to the electorate. Voters would be asked if they wanted Catalonia to be a state and if they wanted it to be an independent state. However, under current Spanish law, the referendum would not be binding because it has not received the backing of the central government.
The Catalan parliament passed a law paving the way for a non-binding vote on secession on Friday, hours after finding out it would not have a Scottish precedent to follow in the region's quest for independence. While noting he would have preferred a yes vote in the Scottish referendum, the Catalan President, Artur Mas, said the task of independence would now be left to Catalonia: "Maybe the first case will be the Catalan one." He said the result in Scotland was not a setback to the Catalan secession drive: "What we really want is the chance to vote. And what happened in Scotland is that they voted, they had a referendum." He added: "The Catalan political process will go on and go ahead."
The law passed on Friday is a last-ditch effort to hold the planned independence referendum on 9 November. Mas now has the power to sign a decree formally calling the consultation, but has not said when he will do so. Once he does, he is likely to be challenged in court by the central government in Madrid, which argues the country's 1978 constitution stipulates that any kind of vote on independence must be put to all Spaniards.
The consultation being put forward by Mas, despite being non-binding, would be illegal, the prime minister, Mariano Rajoy, has said repeatedly.
Artur Mas refers to the 'unofficial' referendum as a 'consultation' but the impact of the results would be much the same…
Do you think Catalonia should be allowed to vote?