With 99.7 percent of the lower house vote counted, the Bersani camp had had 29.55 percent of the vote, to Berlusconi's 29.17 percent. Grillo had 25.54 and Monti's alliance 10.56.
In the Senate, near complete Interior Ministry figures showed Bersani and his allies had nearly 32 percent while Berlusconi and his coalition partners were pulling nearly 31 percent. Grillo had more than 23 percent. The overseas Senate ballot was to be added to the total later Tuesday.
More important than the overall national numbers, however, was the state-of-play in large swing regions — and Berlusconi was projected to win those.
Italy's complex electoral law calls for the Senate seats to be divvied up according to how candidates fare region by region, and Berlusconi appeared to be winning big in Lombardy, and also ahead in the closely watched regions of Sicily and Campania, around Naples.
A Berlusconi triumph in those key regions would likely hand him control of the upper chamber, which in Italy's legislative system is as powerful as the lower house.
When Berlusconi was forced out of office in November 2011, he was widely assumed to have joined the political dead. At 76, blamed for mismanaging the economy and disgraced by criminal allegations of sex with an underage prostitute, a comeback seemed impossible.
But one thing has become axiomatic about Berlusconi in his 20 years at the center of Italian politics: Never count him out.
This time around, in an age of wrenching austerity, he had a very simple campaign strategy: throw around the cash.
Berlusconi has promised to give back an unpopular property tax imposed by Monti — with money from his own deep pockets, if need be.
Even his purchase of star striker Mario Balotelli for his AC Milan soccer team was widely seen as a ploy to buy votes. Berlusconi has also appealed to Italy's right-wing by praising Italy's former fascist dictator Benito Mussolini during a ceremony commemorating Holocaust victims.
"He played a very able game," said Walston. "Considering that he didn't fulfill his previous promises, it's extraordinary."
With near complete results, Bersani had a tiny edge in the lower chamber, where electoral law enables the biggest vote-getter there to end up with a bonus of more than 50 percent of the seats.
Monti's centrist coalition was having a terrible election, with his alliance getting roughly 10 percent. Although respected abroad for his measures that helped stave off Italy's debt crisis, the economist has widely been blamed for financial suffering caused by austerity cuts.
Analysts saw two big stories in Italy's election.
"The first is the big surprising increase scored by the 5 Star Movement, and the other is the disappointing result" of Monti's coalition, said Massimo Franco, a columnist with Corriere della Sera.
Berlusconi, who was forced from office in November 2011 by the debt crisis, has sought to close the gap by promising to reimburse an unpopular tax — a tactic that brought him within a hair's breadth of winning the 2006 election. The billionaire media mogul only a few days ago told voters if need be, he'd reimburse the tax to them by shelling out from his own pocket to the tune of several billion euros (dollars).
Grillo's forces are the greatest unknown. His protest movement against the entrenched political class has gained in strength following a series of corporate scandals that only seemed to confirm the worst about Italy's establishment. If his self-styled political "tsunami" sweeps into Parliament with a big chunk of seats, Italy could be in store for a prolonged period of political confusion that would spook the markets. He himself won't hold any office, due to a manslaughter conviction.
"Italy has developed a two-bloc system. We now have a three bloc system!" Walston said, referring to Grillo's shock success.
"That might work in a country like Austria, or like Germany" where there aren't such marked differences between coalitions. But in Italy, he said, "the personal, policy and ideological differences are too big."
Most analysts believe Bersani would seek an alliance with center-right Monti to secure a stable government, assuming parties gathered under Monti's centrist banner gain enough votes.
While left-leaning Bersani has found much in common with Monti, a large part of his party's base is considerably further to the left and could rebel.
A key Monti ally called the result "totally negative" and had an even gloomier assessment for his nation.
"As far as Italy goes," said Gianfranco Fini, "I fear the worst is yet to come."
Barry reported from Milan.