Prime Minister Mariano Rajoy waves next to his wife Elvira Fernandez at PP headquarters on Sunday night. JOSE JORDAN / AFP

A new political era opened up in Spain on Sunday.

Spaniards have decided to end over three decades of two-party rule by the Popular Party (PP) and the Socialist Party (PSOE).

Instead, their voting choices in Sunday’s general election have created a highly fragmented scenario that will require coalitions over the next four years.

We are going to participate in this political change. It all begins today”

Ciudadanos leader Albert Rivera

While the incumbent PP has managed to attract the most votes, its 123 seats are a far cry from the 186 it obtained in 2011 and the 176 it required for an absolute majority.

The PSOE came in second with 90 seats, its worst result ever. In November 2011 it won 110 seats in what already amounted to a crushing defeat to the PP.

The conservative incumbent, Mariano Rajoy, was the last of the main candidates to make a public statement after the Sunday ballot. Speaking a little after midnight, the prime minister insisted on the need to reach deals in the new scenario.

Bad news for Catalan separatists Miquel Noguer In Catalonia, Sunday delivered bad news to the secessionists. Premier Artur Mas’s new brand, Democràcia i Llibertat, obtained no more than eight seats in Spanish Congress, while the Catalan Republican Left (ERC) secured one more. But the big winner in the region was the local Podemos brand, En Comú Podem, which attracted enough votes to send 12 deputies to the Spanish Congress. Podemos’s position in Catalonia has been to defend a legal referendum in the region, as opposed to Mas and ERC’s outright defense of separatism or Ciudadanos’ opposition to it.

“Whoever wins the elections has the obligation to try to form a government, and I will try to do so because Spain needs a stable government,” he told a crowd of cheering supporters. “It’s not going to be easy. We will need to talk a lot, but I am going to try.”

For his part, Socialist candidate Pedro Sánchez thanked the more than five million Spaniards who voted for him “in the face of the attempt to make the PSOE disappear.”

“A new political era is opening up in Spain that leaves imposition behind and opens up a process of dialogue and agreements,” he said, in reference to the PP’s loss of its absolute majority. “History has been done. The future is ours.”

The strong results by the newcomer parties Ciudadanos (40 seats) and most particularly Podemos (42 seats, or as many as 69 counting the party’s regional brands in Catalonia, Valencia, Galicia and the Basque Country) have created a new playing field that will make it difficult to reach stable government agreements.

The new parliament will not only have more pieces – they will also be harder to connect because of their patent incompatibilities. As the final results of the vote came in, many Spaniards began celebrating the changes but also wondering just how governable their country is going to be from now on.

Prime Minister Mariano Rajoy is going to have a very hard time forming a strong enough coalition to create a government. Even if Ciudadanos was willing to support it – and leader Albert Rivera has said he is not – its 40 seats would not create a strong enough majority.

But an alternative, left-wing government to the PP would require an alliance of more than three parties, including the PSOE and Podemos.

But Podemos’s Pablo Iglesias has yet to confirm whether he is willing to support the Socialists, many of whose voters have switched allegiances in favor of the younger anti-austerity group.

To make the situation even more complicated, the PP does obtain an absolute majority in the Senate

Instead, on Sunday he avoided speaking of pacts, but said he was willing to “reach out” to other parties in exchange for the constitutional reforms that Podemos supports.

Ciudadanos has said that it is not willing to support a government that includes Podemos or any separatist parties, but will instead work alone from the political center.

“Millions of Spaniards have decided that Spain is going to change,” said Rivera in his post-election speech to followers. “We are going to participate in this political change. It all begins today.”

In any case, Spain’s two main parties have gone from jointly representing over 80 percent of voters to speaking for no more than 50 percent, confirming all forecasts about the end of Spain’s political duopoly.

To make the situation even more complicated, the PP does obtain an absolute majority in the Senate, which could predictably place hurdles in the way of any legislation proposed by a government of a different political stripe.