The parliament of the Spanish region of Catalonia has adopted a resolution which supports independence from Spain.
The declaration of secession is the first step towards independence, says the Catalan separatist alliance which tabled the motion.
It says it believes it will be achieved within 18 months.
Spanish Prime Minister Mariano Rajoy said his government would file an appeal with the constitutional court to try to stop the move.
He told reporters that, after an emergency cabinet meeting on Wednesday, he would "sign a recourse [to the Constitutional Court] of unconstitutionality and will ask for... the immediate suspension of this initiative and all its possible effects".
Mr Rajoy had previously said he would take legal action against the Catalan parliament if it was to approve a secession plan.
Catalan nationalist parties won a majority of seats in the parliament in September and the motion approved on Monday is seen as the first step towards the creation of an independent state, says the BBC's Tom Burridge in Madrid.
The two-page document states that because the pro-independence parties won the elections, while campaigning purely on the issue of independence, the process of creating a new Catalan state has now begun.
This declaration of independence is opposed by Catalan non-independence parties, and the Spanish state.
The Spanish constitutional court is likely to declare it illegal, our correspondent says.
However, the document states that the Spanish constitutional court lacks legitimacy, and that moves by the Spanish state to block Catalonia breaking away from the rest of Spain will not be recognised by the Catalan parliament.
The pro-independence parties said ahead of the September vote that they considered it a de facto referendum on independence from Spain.
They argue that the Spanish government has consistently refused to allow a legally recognised referendum to take place, ignoring an unofficial vote backing independence in November 2014.
Opinion polls suggest a majority of Catalans favour a referendum on independence, but are evenly divided over whether to secede.