Catalonia crisis: What next for Spain?
It is the biggest political crisis in Spain for 40 years and a major challenge for the European Union.
After years of mutual hostility, independence supporters have proclaimed Catalonia a republic - and Spain has responded by imposing direct rule on the autonomous region.
So how could events unfold in Catalonia now?
How did we arrive here?
Years of Catalan ill-feeling over the level of autonomy the region had under the Spanish constitution culminated in a surge towards independence this autumn.
On 27 October, the regional parliament, where separatist MPs made up the majority, officially declared independence, just as the Spanish Senate met to discuss the government's response.
The Catalan MPs voted to transfer legal power from Spain, a constitutional monarchy, to an independent republic. That means they no longer recognise the Spanish constitution.
Catalan MPs opposed to independence, who won about 40% of the vote at Catalonia's last regional election, boycotted the vote.
They had likewise boycotted the self-determination referendum on 1 October, which Spain tried to ban. That ballot, according to the organisers, resulted in a Yes vote of 90%, with turnout of 43%.
How did Madrid respond?
It used new emergency powers, under Article 155 of the Spanish constitution, to sack Catalan President Carles Puigdemont and his entire cabinet, and dissolve the regional parliament.
Spanish Prime Minister Mariano Rajoy's loyal right hand, Deputy Prime Minister Soraya Sáenz de Santamaría, has been appointed to run the region temporarily.
An early regional election has been called for 21 December.
Catalonia's 17,000-strong local police force, the Mossos d'Esquadra, was taken over by the Spanish Ministry of Interior. The force's popular chief, Josep Lluís Trapero, was also dismissed and replaced by his low-profile deputy, Ferran López.
What do the Catalan separatists do now?
Mr Puigdemont said he and his allies would resist "democratically" the imposition of direct rule.
The ousted president then travelled to Belgium, saying it was for "for safety purposes" and because he wanted to be able to speak freely.
Meanwhile, grassroots independence activists have been calling for mass demonstrations to "defend the republic".
It is likely that the separatists will organise strikes, boycotts and more mass rallies in response to Madrid's actions.
The main separatist grassroots group, the Catalan National Assembly, regards the Rajoy administration as a "foreign government".
It has called on the region's civil servants not to follow orders from the Spanish government in a display of "peaceful resistance".
Do the secessionists face legal action?
Mr Puigdemont and 13 of his deputies from the ousted Catalan government have been ordered to appear in court in Madrid. They are accused of rebellion - which carries a maximum 30-year jail term - as well as sedition and misuse of funds.
They are yet to be formally charged. A High Court judge will have to decide whether the officials should go to jail pending an investigation that could potentially lead to a trial.
Nine of the sacked politicians attended the court summons on Thursday. However, Mr Puigdemont said he would not return from Belgium without a guarantee of a fair trial.
The same charges have been drawn up against the Catalan parliament's speaker, Carme Forcadell, and five other senior MPs - but because they have parliamentary immunity, their case is being heard by the Supreme Court.
Meanwhile, the former Mossos chief could also be charged with sedition. Mr Trapero is accused of failing to help national police officers tackle pro-independence protesters during an incident in Barcelona during the run-up to the referendum.
Two key figures in the grassroots separatist movement, Jordi Cuixart and Jordi Sànchez, are in custody in a prison near Madrid awaiting the outcome of an investigation into the same incident.
Can Madrid really regain control?
It is not clear how quickly or effectively Spain can reassert central control over Catalonia.
It is reported that Mossos officers have been urged to remain neutral as they begin taking orders from Madrid.
The plan is for the special measures to remain in place until the election in December.
On paper, the plan is clear, the BBC's Sarah Rainsford reports, but implementing that in practice is a complex process, and one bound to meet stiff resistance from those who just voted for independence.
Any use of force by the security services will be closely watched after the uproar over police brutality on polling day.
Videos showed police dragging some voters away from ballot boxes and hitting them with batons.
Is there still room for compromise?
The two sides are poles apart after the proclamation of independence and imposition of direct rule.
One significant gesture the Spanish government could still make to appease Catalan nationalists is to restore some constitutional amendments from 2006 which boosted Catalonia's status.
They were struck down four years later at the request of Mr Rajoy's own Popular Party.
How great is the economic factor?
Madrid has powerful economic levers, even though Catalonia is one of Spain's wealthiest regions.
More than 1,600 companies, including the banks Caixa and Sabadell and several utility companies, have decided to move their legal headquarters out of Catalonia since the referendum.
Catalonia accounts for about a fifth of Spain's economic output but Catalonia also has a huge pile of debt and owes €52bn (£47bn; $61bn) to the Spanish government.
Will the outside world act over Catalonia?
The cause of Catalan statehood has long been argued abroad by the separatists and since the referendum they have been calling for international mediation.
The motion passed by the Catalan parliament urges the EU to "intervene to stop the violation of civic and political rights" by the Spanish government.
However, the EU and its individual member states, as well as the US, have made clear they see the crisis as an internal matter for Spain.
"Catalonia is an integral part of Spain, and the United States supports the Spanish government's constitutional measures to keep Spain strong and united," a US state department statement said.
It is very hard for any region to achieve independence under international law.
Kosovo discovered that when it broke away from Serbia, even though it had a strong case on human rights grounds and the support of Nato and much of the EU but not, significantly, Spain.