Protesters react as news comes through of the Catalan parliament's declaration of independence on Friday. Credit:Emilio Morenatti "It is based on a vote that was declared illegal by the Spanish courts. We continue to want to see the rule of law upheld, the Spanish Constitution respected, and Spanish unity preserved," the spokesperson said. The motion passed in the regional parliament in Barcelona - which was boycotted by opposition parties - said Catalonia constituted an independent, sovereign and social democratic state. It called on other countries and institutions to recognise it. It also said it wanted to open talks with Madrid to collaborate on setting up the new republic. "It is not going to be easy, it is not going to be free, it is not going to change in a day. But there is no alternative to a process towards the Catalan Republic," lawmaker Marta Rovira of the Junts pel Si pro-independence alliance said in a debate leading to the vote.

Independence protesters outside the Catalan parliament in Barcelona on Friday. Credit:AP After the debate, lawmakers from members of three main national parties - the People's Party, the Socialists and Ciudadanos - walked out. Members of the pro-independence parties and the far-left Podemos then voted in 70-10 in favour in a secret ballot aimed at hindering any attempt by the central government to lay criminal charges on them. Lawmakers in the Catalan parliament in Barcelona ahead of Friday's independence vote. Credit:AP Spanish shares and bonds were sold off when the result of the vote was announced.

Catalan leader Carles Puigdemont left the chamber to shouts of "President!" Protesters hold fake handcuffs as they take part a rally outside the Catalan parliament in Barcelona. Credit:AP The European Union said "nothing had changed" following the vote, with the European Commission President Donald Tusk saying he would continue to deal only with Madrid. Meanwhile in the Spanish capital, the upper house of the Spanish parliament authorised the Rajoy government to rule Catalonia directly from Madrid, minutes after the restive region declared independence. Catalonia's president Carles Puigdemont said it was up to the Catalan parliament to move forward with a mandate to break from Spain. Credit:AP

Rajoy was expected to convene his cabinet to adopt the first measures to govern Catalonia. This could include firing the Barcelona government and assuming direct supervision of Catalan police forces. "Exceptional measures should only be adopted when no other remedy is possible," Rajoy had said earlier in an address to the Senate. "In my opinion there is no alternative. The only thing that can be done and should be done is to accept and comply with the law." The Catalan leadership was ignoring the law and making a mockery of democracy, he said. "We are facing a challenge unprecedented in our recent history," said Rajoy, who has staked out an uncompromising position against Catalonia's campaign to break away from Spain.

Exactly how direct rule would work on the ground - including the reaction of civil servants and the police - is uncertain. Some independence supporters have promised to mount a campaign of civil disobedience, which could lead to direct confrontation with security forces. The crisis developed after an independence referendum on October 1 was declared illegal by Madrid. Although it endorsed independence, it drew only a 43 per cent turnout as Catalans who oppose independence largely boycotted it. 'Worried and nervous' In Barcelona, crowds of independence supporters were swelling on downtown streets, shouting "Liberty" in the Catalan language and singing traditional Catalan songs.

"I'm worried, I'm nervous like everybody. But freedom is never free," said Jaume Moline, 50. Montserrat Rectoret, a 61-year-old historian, said: "I am emotional because Catalonia has struggled for 40 years to be independent and finally I can see it." The crisis has split Catalonia and caused deep resentment around Spain - national flags now hang from many balconies in the capital in an expression of unity. It has also prompted a flight of business from the wealthy north-eastern region and alarmed European leaders who fear the crisis could fan separatist sentiment around the continent. Catalonia is one of Spain's most prosperous regions and already has a high degree of autonomy. But it has a litany of historic grievances, exacerbated during the 1939-1975 Franco dictatorship, when its culture and politics were suppressed.

Catalonia's drive to independence The secessionist region of Catalonia is at the centre of Spain's biggest political crisis since a failed coup d'etat in 1981. Loading Here is how the stand-off has developed. June 28, 2010: The Constitutional Court strikes down several articles of a statute extending Catalonia's autonomy.

The Constitutional Court strikes down several articles of a statute extending Catalonia's autonomy. September 11, 2012: The first pro-independence demonstration is held in Barcelona, attracting more than 1 million people, on the national day of Catalonia. The protest becomes an annual event.

The first pro-independence demonstration is held in Barcelona, attracting more than 1 million people, on the national day of Catalonia. The protest becomes an annual event. November 9, 2014: A first independence referendum is held informally, after the Constitutional Court bans it. Out of 5.4 million eligible voters, more than 2 million turn up, and 80 per cent back secession.

A first independence referendum is held informally, after the Constitutional Court bans it. Out of 5.4 million eligible voters, more than 2 million turn up, and 80 per cent back secession. September 27, 2015: A pro-independence coalition, Junts Pel Si (United for Yes), wins regional elections and forms a government with the support of the anti-capitalist, secessionist CUP party.

A pro-independence coalition, Junts Pel Si (United for Yes), wins regional elections and forms a government with the support of the anti-capitalist, secessionist CUP party. September 6, 2017: The Catalan parliament agrees to hold an independence referendum in a vote boycotted by the opposition. The Constitutional Court invalidates the ballot on the next day.

The Catalan parliament agrees to hold an independence referendum in a vote boycotted by the opposition. The Constitutional Court invalidates the ballot on the next day. September 20, 2017: Spanish police seize almost 10 million ballot papers and arrest 14 pro-independence politicians and officials, in an attempt to disrupt referendum plans. Street protests ensue.

Spanish police seize almost 10 million ballot papers and arrest 14 pro-independence politicians and officials, in an attempt to disrupt referendum plans. Street protests ensue. October 1, 2017: The referendum takes place despite raids by Spanish riot police on polling stations. Five people are hospitalised and more than 800 people report injuries after clashes with officers. The result is a 90 per cent vote for independence, with a 43 per cent turnout, Catalan authorities say. But there is no proper monitoring and voting irregularities are suspected.

The referendum takes place despite raids by Spanish riot police on polling stations. Five people are hospitalised and more than 800 people report injuries after clashes with officers. The result is a 90 per cent vote for independence, with a 43 per cent turnout, Catalan authorities say. But there is no proper monitoring and voting irregularities are suspected. October 3 and 8, 2017: A pro-independence general strike paralyses Catalonia and attracts 700,000 people in Barcelona. Five days later, 350,000 people march in the Catalan capital against secession.

A pro-independence general strike paralyses Catalonia and attracts 700,000 people in Barcelona. Five days later, 350,000 people march in the Catalan capital against secession. October 10, 2017: Catalan president Carles Puigdemont says his region has the right to declare independence, but will hold off enacting it in order to seek negotiations with Madrid.

Catalan president Carles Puigdemont says his region has the right to declare independence, but will hold off enacting it in order to seek negotiations with Madrid. October 16: Puigdemont dodges a first government ultimatum to retract secessionist plans. Hours later, two leading pro-independence campaigners are ordered into pre-trial detention for sedition.

Puigdemont dodges a first government ultimatum to retract secessionist plans. Hours later, two leading pro-independence campaigners are ordered into pre-trial detention for sedition. October 19: After Puigdemont fails to comply with a second ultimatum, the Spanish government announces the activation of article 155 of the constitution, allowing it to suspend Catalonia's home-rule powers.

After Puigdemont fails to comply with a second ultimatum, the Spanish government announces the activation of article 155 of the constitution, allowing it to suspend Catalonia's home-rule powers. October 27: The Spanish Senate votes on authorising the use of article 155 by the government, while the Catalan parliament votes through a resolution to start the process of independence.

Reuters, AAP