Catalonia: What powers does the region have?
Parliament in Catalonia has declared independence while the Spanish senate has approved a government proposal to reassert control over the region after its disputed independence referendum.
The Spanish government wants to dismiss the Catalan government and president, and put its national media company and police force under the control of Madrid.
How is Catalonia governed?
Spain is divided into 17 regions, each with directly elected authorities.
Catalonia, in the north-east of the country, has one of the greatest levels of self-government in Spain.
It has its own parliament, government and president, police force and public broadcaster.
Catalans have a range of powers in many policy areas from culture and environment to communications, transportation, commerce and public safety.
Foreign affairs, the armed forces and fiscal policy are the sole responsibility of the Spanish government.
The division of powers between the central government in Madrid and the regional government in Barcelona is not as clear-cut as it is in some other countries with devolved authorities such as Germany or the UK.
In the UK, for example, the government in Westminster cannot interfere in Scottish education policy because education is fully devolved.
But in Spain, the Spanish constitution takes precedence if there is a clash with any region - something that the Catalan government resents.
Carles Puigdemont assumed the office of President of Catalonia in January 2016.
He leads the Catalan government.
The vice-president, Oriol Junqueras, is also economics minister.
There are 12 ministers, with portfolios including education, health, culture, home affairs and welfare.
The Catalan government employs 28,677 people, comprising civil servants and other staff.
Catalonia has its own police force, the Mossos d'Esquadra.
The force employs just over 17,000 people, including police officers and back-office staff.
They are in charge of public safety and order, and criminal investigations.
Spanish national police, under the direct command of the Spanish interior ministry, are also permanently deployed in Catalonia, working on counter-terrorism, immigration and other issues.
The Catalan Media Corporation (CCMA) is the public broadcaster of Catalonia.
It employs 2,319 people across five television channels, four radio stations and other supporting services.
Six parties are represented in Catalonia's 135-seat regional parliament.
Three of them are pro-independence.
Elections were held on 27 September 2015 and "Together for Yes" (JxSí), a coalition of two parties and civic organisations, focused on achieving independence from Spain, won the largest number of seats - 62.
It was short of an absolute majority and required support from the pro-independence, anti-capitalist Popular Unity Candidacy (CUP), with 10 seats, to form the government.
The second largest party in the parliament, with 25 seats, is the liberal anti-nationalist Citizens-Party of the Citizenry (Cs).
The Socialists' Party of Catalonia (PSC-PSOE), with 16 seats, and the People's Party of Catalonia (PPC), the Catalan affiliate of Spanish Prime Minister Mariano Rajoy's People's Party, with 11 seats, also oppose independence.
Catalonia Yes We Can (CSQP), a left wing-green coalition, which won 11 seats, is in favour of self-determination for the Catalan people.