Spain's political parties are facing a struggle to form a stable government after a historic election that broke the traditional two-party dominance.
The incumbent conservatives took most votes, but the surge of two new forces stripped it of its majority.
King Felipe VI will now talk to all parties before nominating a candidate for PM, who must then win a vote of approval in the hung parliament.
The uncertainty prompted a fall on Monday in the Madrid stock market.
The Ibex 35 index of most traded shares closed down 3.6%.
For decades the conservative Popular Party (PP), now led by PM Mariano Rajoy, and the Socialists (PSOE) had dominated the Spanish political scene.
But a surge of support for the anti-austerity Podemos party and the centrist Ciudadanos has broken the mould.
Italian Prime Minister Matteo Renzi said on Monday that the PP's failure showed the shortcomings of European Union-driven austerity measures.
"As has already happened in Greece and Portugal, governments which apply rigid austerity measures... are destined to lose their majority", he was quoted as saying by Reuters.
'Still No.1 force'
The PP took 28.72% of the vote in Sunday's election, the PSOE 22.01%, Podemos 20.66% and Ciudadanos 13.93%.
In the 350-seat parliament this translates to: PP (123); PSOE (90); Podemos (69); Ciudadanos (40).
Mr Rajoy's immediate reaction was to insist his party was "still the number one force" and he would attempt to form an administration.
Socialist leader Pedro Sanchez was equally adamant that Spain wanted "a move to the left".
Although he acknowledged Mr Rajoy had won the right to have the first attempt at forming a government, the Socialists made it clear they would not back a Rajoy-led government.
'New era' - BBC's Tom Burridge in Madrid
This is the beginning of a new, multi-party era in Spain. The unrivalled dominance of the PP and the Socialists, who alternated in power for 32 years, always with parliamentary majorities, is over.
Compromise and co-operation, so fundamental in Spain's transition to democracy at the end of the 1970s, but generally absent in much of the political discourse since, will have to become the new watchwords of Spanish politics.
A PP-led government, or one led by the Socialists, will require long and complicated negotiations.
The new parties, particularly Podemos, would surely demand radical changes in the way Spain is governed and in economic policy, before risking being a junior partner in any government.
The figures show that finding any workable administration could be a tough task.
An alliance between the PP and the liberal Ciudadanos would not provide enough seats for a majority.
But an alliance of the PSOE and Podemos would fall similarly short.
Nevertheless, both Podemos and Ciudadanos were celebrating their performances.
At a press conference on Monday, Podemos leader Pablo Iglesias hailed its successes and said he would now meet with allies to decide how to proceed. He said he would hold talks with all the political groupings but that these had not yet started.
But he insisted Podemos would "not allow the PP to govern".
He also said those who were talking of a "grand coalition" between the PP and the Socialists had failed to recognise Spain was no longer a two-party system.
Echoing this, Ciudadanos deputy leader Jose Manuel Villegas said: "The two ancient parties, the old left and the old right, won't have power anymore."
Doing the post-election sums:
- Grand coalition: Spain has never had a so-called grand coalition that would bring the Popular Party and the Socialists together - and the Socialists said on Monday they would not join a grand coalition
- Coalition of losers: The Socialists could link up with Podemos and Ciudadanos in a move that would echo the outcome of elections in Portugal last month
- Regional solution: The Socialists could also strike a deal with Podemos and smaller regional parties that won just a few seats each, thereby removing the need for a deal with Ciudadanos
The spotlight could fall on the six smaller groupings, who took 28 seats.
The biggest of these is Erc-Catsi, the Catalonian separatists, with nine seats, but there are other regional separatists from the Basque Country and the Canary Islands.
Joining forces with Mr Rajoy might seem unlikely, given he has called regional separatism the biggest threat to Spanish unity in decades.
In line with the Spanish constitution, after talking to each party, the king will nominate a candidate for prime minister. This cannot take place until after the new Congress holds its inaugural meeting on 13 January.
The nominee must then win a vote of confidence in parliament. If this fails, another candidate can be nominated and seek parliamentary approval.
If no administration can be formed within two months of the election, another must be held.
The key issues facing the parties - and which dominated the election - are the economy, corruption, unemployment, regional separatism and social inequality.
Mr Rajoy campaigned on a platform of economic progress, having staved off the threat of collapse. The economy is now one of the fastest-growing in the EU.
Unemployment has been cut, but is still at 21%.
His opponents pointed to his harsh austerity measures - big cuts in public spending, tax increases and health reforms - and the suffering they had caused many Spaniards.
The Spanish result echoes similar leftist swings in southern Europe this year. Syriza won in Greece in January. And the success of a leftist grouping in Portugal will also inspire the Spanish left.
Sunday's election turnout in Spain was 73.2% of the 36.5 million registered voters - up slightly on the 2011 election.
'Worrying Italianisation' - Media round-up
"Negotiations on forming the government will be tough, but the key constitutional players are expected to take on this task with a constructive spirit," says El Pais in its editorial. "After four years in which political dialogue has been conspicuous by its absence, the parties must resume the path of negotiation."
Luis Ventoso in the Madrid based daily ABC, says: "The Spanish political system last night lost the stability of the majority… and now enters a worrying process of Italianisation."
"Nothing will ever be the same again," says the Madrid daily El Mundo. "The Spanish political map will completely change after yesterday's destruction of the two-party system and the emergence of two start-up forces. The PP gained the most votes, but it will be very difficult to govern with stability."
The daily La Razon dislikes the possibility of the Socialists and Podemos forming a coalition with regional independence parties, saying: "A government based on pacts between such a wide range of parties, united solely by the desire to oust the Popular Party from power, is not what Spain needs right now."