Spain's political future uncertain after election
It is the beginning of a new, multi-party era in Spain.
The unrivalled dominance of the conservative Popular Party (PP) and the Socialists (PSOE), who have alternated in power for 32 years, always with parliamentary majorities, is over.
The ball is in the PP's court. Protocol dictates that the party that wins the most votes has the right to try to form a government. But the key word there is "try".
On paper at least the PP will struggle, because during the election campaign so many parties ruled out going into government with it.
It is the PP's worst election result since 1989. Its share of the vote fell from 45% in 2011 to 29% this time.
Even if you add the PP's seats to those won by the new liberal party Ciudadanos (Citizens), with which it has some common ground - mainly on the economy - such an alliance would still be 13 seats short of 176 - the majority needed to govern.
Time for compromise
A key player in the process will be Spain's King Felipe, who has only been on the throne for 18 months following the abdication of his father.
The king will oversee the process and ask a party leader, probably incumbent Prime Minister Mariano Rajoy, to attempt to form another government.
But if Mr Rajoy cannot get enough other parties to join him, then in theory the king should turn to another leader, probably the Socialists' Pedro Sanchez.
His PSOE came second with 22% - that is, 90 seats in parliament.
It was the PSOE's worst result since Spain's transition to democracy at the end of the 1970s.
Compromise and co-operation, so fundamental in that transition, but generally absent from political discourse since, will have to become the new watchwords of Spanish politics.
The PSOE could team up with the anti-austerity party Podemos ("We can") which, standing at its first-ever general election, came an impressive third, fractionally behind the Socialists with 21%.
But Spain's electoral system favours the traditional parties, so Podemos's 21% translates into 69 seats.
Even if Podemos is open to a deal with the PSOE, and Spain's former Communist party (United Left), then this coalition of the left would need either the support of Ciudadanos or of a Basque nationalist party and Catalan pro-independence parties to reach a majority.
The latter would possibly demand a referendum in Catalonia on independence from Spain, as part of a deal. Podemos promised that in its election manifesto, but the PSOE remains opposed.
In either scenario - a PP-led government, or PSOE-led - long, complicated negotiations will be necessary.
The new parties would surely demand radical changes in the way Spain is governed and in economic policy, before risking being a junior partner in any government.
Podemos won by a distance in Catalonia, won the most votes in the Basque Country and came second in Madrid.
The party was formed from the "occupy" protest of the so-called Indignados ("indignant ones") at the end of 2011. The grassroots movement, known in Spain as 15-M, involved people camping out for weeks in Madrid's main square in protest against the economic crisis.
It tapped into the widespread dissatisfaction among a large, mainly young chunk of Spain that is fed up with the traditional way of doing politics, and the corruption scandals which have tarnished the old parties.
Podemos consolidated its success at regional elections in May this year, when its allies took control in Madrid, Barcelona, Zaragoza and Cadiz.
Podemos's success is also a message to EU leaders: that many Spaniards want the politics of austerity to change.
The fact that so many Spaniards are worse off now than they were four years ago was a big factor in the way many cast their vote.
Ironically the relatively new liberal party Ciudadanos, which sells itself as a "centrist" force, could play a key role in negotiations - even though it fell short of expectations in this election. It won 40 seats.
However, the clock is ticking. Spain has two months to form a new government.
If no leader can put together the necessary number of deputies in parliament then Spain could face fresh elections.
That is a realistic possibility.
Spanish politics used to be predictable. For outsiders the dominance of the PP and PSOE made things almost boring.
Overnight the landscape has shifted and things are infinitely more unpredictable, because a lot of Spaniards voted for new parties and for change.
Since its transition to democracy Spain has always had deep divisions under the surface. The political split is now wide open.