You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
The centre-left coalition led by Pier Luigi Bersani won the lower house by around 125,000 votes and claimed the most seats in the Senate but was short of the majority in the upper house that it would need to govern.
Bersani claimed victory but said it was obvious that Italy was in "a very delicate situation".
Party officials said the centre-left would try to form a government but it was unclear what its options would be.
Neither Grillo, a comedian-turned-politician who previously ruled out any alliance with another party, nor Silvio Berlusconi's centre-right bloc, which threatened to challenge the close tally, showed any immediate willingness to negotiate.
World financial markets reacted nervously to the prospect of a government stalemate in the euro zone's third-largest economy with memories still fresh of the financial crisis that took the 17-member currency bloc to the brink of collapse in 2011.
Italy's borrowing costs have come down in recent months, helped by the promise of European Central Bank support but the election result confirmed fears that it would not produce a government strong enough to implement effective reforms.
Grillo's surge in the final weeks of the campaign threw the race open, with hundreds of thousands turning up at his rallies to hear him lay into targets ranging from corrupt politicians and bankers to German Chancellor Angela Merkel.
In just three years, his 5-Star Movement, heavily backed by a frustrated generation of young Italians increasingly shut out from permanent full-time jobs, has grown from a marginal group to one of the most talked about political forces in Europe.
Its score of 25.5 percent in the lower house was just ahead of the 25.4 percent for Bersani's Democratic Party, which ran in a coalition with the leftist SEL party and it won almost 8.7 million votes overall, more than any other single party.
"The 5-Star Movement is the real winner of the election," said SEL leader Nichi Vendola, who said that his coalition would have to deal with Grillo, who mixes fierce attacks on corruption with policies ranging from clean energy to free Internet.
"It's a classic result. Typically Italian," said Roberta Federica, a 36-year-old office worker in Rome. "It means the country is not united. It is an expression of a country that does not work. I knew this would happen."
A long recession and growing disillusion with mainstream parties fed a bitter public mood that saw more than half of Italian voters back parties that rejected the austerity policies pursued by Prime Minister Mario Monti with the backing of Italy's European partners.
Berlusconi's campaign, mixing sweeping tax cut pledges with relentless attacks on Monti and Merkel, echoed many of the themes pushed by Grillo and underlined the increasingly angry mood of the Italian electorate.
Stefano Zamagni, an economic professor at Bologna University said the result showed that a significant share of Italians "are fed up with following the austerity line of Germany and its northern allies".
"These people voted to stick one up to Merkel and austerity," he said.
Election rules give the centre-left a solid majority in the lower house, despite its slim advantage in terms of votes, but without the Senate it will not be able to pass legislation.
Calculations by the Italian Centre for Electoral Studies, part of LUISS university in Rome, gave 121 seats to Bersani's coalition, 117 to Berlusconi, 54 for Grillo and 22 to the centrist coalition led by Monti.
That leaves no party or likely alliance with the 158 seats needed to form a Senate majority.
Even if the next government turns away from the tax hikes and spending cuts brought in by Monti, it will struggle to revive an economy which has scarcely grown in two decades.
Monti was widely credited with tightening Italy's public finances and restoring its international credibility after the scandal-plagued Berlusconi, whom he replaced as the 2011 financial crisis threatened to spin out of control.
But he struggled to pass the kind of structural reforms needed to improve competitiveness and lay the foundations for a return to economic growth and a weak centre-left government may not find it any easier.