(CNN) Spain's deepening political crisis came to a head Friday when the central government moved to dismiss the top leaders in Catalonia and dissolve the regional Parliament, an action taken not long after the Catalan government finally made a formal declaration of independence .

The standoff over Catalonia, the richest of Spain's 17 regions, has plunged one of the European Union's biggest countries into its worst political crisis since the restoration of democracy in the 1970s.

It was triggered by Catalan leaders pushing ahead with an independence referendum on October 1 that was declared illegal by Spain's highest court and marred by a violent crackdown by national police.

Here's what we know about what comes next and how we got here.

What happened?

After weeks of uncertainty, the Catalan government led by President Carles Puigdemont voted in favor of a unilateral declaration of independence from Spain.

The vote came almost a month after the disputed independence referendum, which was banned by Spain's top court and marred by a violent police crackdown.

It was the culmination of a yearslong effort by secessionists in Catalonia, one of the richest regions in Spain.

Some 90% voted in favor of independence in the referendum, but turnout was only 43%. The secessionist movement has deeply divided Catalonia.

Shortly after the vote in the Catalan Parliament on Friday, the Spanish Senate in Madrid voted in favor of imposing direct rule on Catalonia, under the provisions of Article 155 of the Spanish constitution. The provisions have never before been enacted.

Spanish Prime Minister Mariano Rajoy then dismissed Catalonia's president and cabinet, dissolved its parliament, called a new regional election for December 21 and took over the functions of the administration in Barcelona. The head of the Catalan regional police force, Josep Lluis Trapero, and the force's director general, Pere Soler, were also sacked.

Rajoy appointed Deputy Prime Minister Soraya Sáenz de Santamaría to take charge of the region.

International reaction against the Catalonian independence movement was swift.

The European Union has made it clear that it does not support the move, fearing breakaway movements in other member states. In any case, under EU rules, Catalonia would not be a member of the EU on its own, and would have to apply for membership from outside the bloc.

Germany, France, the United Kingdom and the United States issued statements saying they would not recognize the independence of Catalonia.

The Scottish government said Catalans "must have the ability to determine their own future" and Cabinet Secretary for Culture, Tourism and External Affairs Fiona Hyslop said the "imposition of direct rule cannot be the solution. ..." A referendum for Scottish independence from the UK failed in 2014.

What comes next?

It is not clear how such a changeover would happen in practice: whether the Catalan government would voluntarily give up its powers or whether officers from Spain's national Guardia Civil would have to remove them from office forcibly.

Catalonia's main opposition group called on civil servants to peacefully resist against orders from Madrid.

Article 155 of the 1978 Spanish constitution has never been used before. It allows the central government to take back control of regions, such as Catalonia and the Basque Country, that were granted sweeping freedoms after the 1975 downfall of the Franco dictatorship, if they act beyond the law or threaten the national interest.

The Madrid government said it was moving ahead with triggering Article 155 to protect the interests of all Spanish people, including Catalans. "Spain is a serious country and a great nation and we will not tolerate that a few people try liquidate our constitution," Rajoy told journalists on Friday.

How did we get here?

Rajoy (L) brought about the removal of Puigdemont (R) and other Catalan leaders.

More than 2.25 million people turned out to cast their ballot in the October 1 referendum, with the regional government reporting that 90% of voters were in favor of a split from Madrid. But the turnout was low -- around 43% of the voter roll -- which Catalan officials blamed on the central government's efforts to stop the vote.

National police launched a concerted effort to prevent people from casting their ballots. That sparked violent clashes that left almost 900 people injured, according to Catalan officials. The scenes shocked Catalans and reverberated around Europe. Madrid's representative to Catalonia later apologized for the violence.

King Felipe intervened on the side of Madrid, saying Catalan leaders had acted "outside the law." Puigdemont had hoped Felipe would mediate the dispute.

When Catalan officials called on the EU to intervene, Brussels backed Madrid.

Catalan Police Chief Josep Lluís Trapero has appeared in a Madrid court along with two leading figures in the Catalan independence movement to answer allegations of sedition.

Hundreds of thousands of people have marched in the streets of Barcelona, calling for unity and talks between Rajoy and Puigdemont.

And in an indication of the uncertainty surrounding Catalonia, several major banks and a number of other companies announced they would move their head offices to other parts of Spain, threatening stability in the country's most economically productive region.

What's the history?

Catalans have their own language, which is based on the romance Latin-based tongues of southern Europe but is quite different from Spanish, which was influenced by the Arabs who ruled huge swathes of medieval Spain. Several times during its history, Catalonia has found itself caught between the rivalries of France and Spain.

The region industrialized before the rest of Spain and had strong anarchist, socialist and communist movements that all fought against General Francisco Franco in the 1936-1939 Spanish Civil War. Franco repressed Catalonia's earlier limited autonomy, and in the early years of the dictatorship at least, expressions of Catalan language and culture. It wasn't until four years after Franco's 1975 death that the region regained some of that autonomy.

In 2006, the Spanish government backed Catalonia's calls for even greater powers, granting "nation" status and financial control to the region. But four years later, the Constitutional Court rescinded that status, ruling that while Catalan is a "nationality," Catalonia itself is not a nation.

One of Spain's 17 autonomous provinces, Catalonia has its own regional government with considerable powers over healthcare, education and tax collection. But it pays taxes to Madrid, and pro-independence politicians argue that complex mechanisms for redistributing tax revenue are unfair to wealthier areas, something that has helped stoke resentment.

The region accounts for a fifth of Spain's economy producing 25% of the country's exports. It contributes much more in taxes (21% of the country's total) than it gets back from the government.