Spain’s Prime Minister Pedro Sanchez has called a general election for April 28 after his minority government’s budget proposal was rejected by lawmakers.

The election is Spain’s third in less than four years, a symptom of an increasingly fragmented political landscape and a sign of how Catalonia will remain a thorny issue for the next leader.

Here’s a look at how things unfolded and what to expect from a new general election:

​How did Spain get here?

There was a time when Spanish politics was largely a two-party business: the Socialists and the conservative Popular Party (PP). Each took turn in power, often relying on the nationalists from regions with a strong cultural identity as their parliamentary crutch.

However, since the 2008 global financial crisis and the recession that followed, Spain’s political landscape has been shaken, notably with the formation of the anti-establishment Podemos (We Can) party and the pro-business Ciudadanos (Citizens), which was founded in Catalonia as a stern response to separatism.

The heightened fragmentation of Spain’s political scene led to an inconclusive election in 2015. When Spaniards went to the polls again months later, Mariano Rajoy, the incumbent prime minister from the PP, declared victory but wasn’t able to form a government until the 11th hour, when Ciudadanos backed him and the Socialists abstained in parliament.

The Catalonia factor

Separatist sentiment among Catalonia’s population of 7.5 million grew on the back of Spain’s economic crisis and came to a head in October 2017 when a separatist coalition led by Carles Puigdemont defied court bans and went ahead with a referendum on independence, which they declared at the end of 2017.

No actions were taken to implement the declaration and no country recognized it. Rajoy took a tough stance against the separatists and Madrid took control of the region.

In June last year, a damaging corruption conviction affecting the ruling PP triggered a no-confidence vote that ousted Rajoy as prime minister and ushered in Sanchez, the young Socialist leader who had returned to favor in his party.

Sanchez, stubborn or naïve?

Sanchez’s female-majority Cabinet increased the minimum wage, announced measures to create new public-sector jobs and expand universal health care.

But his first weeks in office were plagued with missteps including a U-turn on his approach to migration, increasingly restricting access in line with other European nations. Some moves, like the exhumation of the late dictator Gen. Francisco Franco’s remains, played to his constituents but was met with eye-rolling by the right wing.

His government’s position has remained precarious throughout given that the Socialists control less than 25 percent of Spain’s lower house.

Sanchez’s two meetings with the new Catalan leader, fervent separatist Quim Torra, have yielded some progress in normalizing relations between the central and regional governments, but have galvanized political opponents in Ciudadanos and PP, and given wings to the emerging far-right Vox party.

What now?

This week’s rejection of his national spending plan by the secessionists in Catalonia and the parties to the right of the Socialists came after Sanchez refused to accept dialogue on Catalonia’s self-determination, a right that Spain’s constitution doesn’t allow.

The electoral backdrop has got more complicated in light of Vox’s recent gains in the Andalusian regional assembly, the first significant win of the far right in post-Franco Spain.

Sanchez’s Socialists lead in the polls but not by enough to form a significant majority in parliament without the support of Podemos and the regional nationalist parties. The prospect of Catalan nationalists joining could well be jeopardized by the trial of a dozen politicians and activists for their roles in the Catalan breakaway bid two years ago.

The trial, as one radio commentator put it, will be “a trailer in flames in the middle of the election.”

The projections also suggest that significant Vox gains could make the far right a potential kingmaker.