Catalonia moved closer to direct rule from Spain, declaring independence from Madrid on Friday, days after a disputed referendum vote, which could now be declared illegal by Spain's constitutional court.
The independence motion was passed in the 135-strong assembly with a thin majority of 70 votes in favour, 10 against and 2 blank ballots with others abstaining.
Lawmakers from the Socialist Party, the People's Party and Ciudadanos abstained from voting and left the chamber before the vote in protest.
It was more symbolic and a show of defiance of the Madrid government, which at the same time was preparing to impose direct rule over the region.
Spanish Prime Minister Mariano Rajoy immediately called for calm and said the rule of law would be restored.
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.
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.
As Catalan leader Carles Puigdemont left the chamber amidst shouts of "President!, in Madrid the upper house of Spain's parliament, the Senate, was due to approve Article 155, the law allowing the central government to take over the autonomous region.