ROME (AP) -- Silvio Berlusconi pulled off another astonishing escape from the political dead, scraping through two confidence votes Tuesday in a dramatic parliamentary showdown. But the Italian leader's hold on power remains precarious as his razor-thin victory makes political gridlock a near certainty - and violent street protests show growing unease with his rule.
Masked protesters torched cars and trash bins, smashed shop windows and clashed with police. Clouds of white tear gas and orange flares engulfed streets, as shops full of Christmas goods hurriedly closed down. Employees at one bank cowered in fear as a group of stone-throwing youths swept by.
Protesters rampaged in the the area around parliament and Berlusconi's residence, which had been cordoned off by heavy police presence. By sundown, almost 100 people, both protesters and police, were reported injured, including about two dozen hospitalized. About 40 were reportedly taken into police custody.
The chaos followed speculation in recent weeks that the end of the Berlusconi era was near.
Weakened by sex scandals and a bitter breakup with his one-time closest ally, Berlusconi seemed destined to be sent packing. The split with Gianfranco Fini had eroded the premier's once comfortable parliamentary majority and left him vulnerable in the lower house.
But Berlusconi battled back, as he has countless times when his political career seemed to be on the ropes. Tuesday's drama confirmed his status as the ultimate political survivor - but he emerges from the battle severely weakened and one top opposition lawmaker called his success a "Pyrrhic victory."
In the most dramatic and closest of the two tests, Berlusconi survived the no-confidence motion in the lower house by just three votes. Scuffles between lawmakers forced a brief suspension in the voting session.
Earlier in the day, Berlusconi had secured a more comfortable victory in a confidence vote at the Senate.
The vote's slim margin means Berlusconi can no longer count on a secure parliamentary majority for passing legislation. Some experts predict he might resign in upcoming weeks, a move that could lead to early elections, which he hopes to win again.
Berlusconi survived Tuesday's challenge by exploiting rifts inside Fini's camp - at the moment of truth, three defected - and managed to sway a handful of undecided lawmakers to his side. In the process, he drew accusations of vote-buying, amid claims of cash changing hands and favors lavished. Berlusconi's allies reject the allegations.
"I'm not a survivor - I'm strong, robust," a smiling Berlusconi joked after the vote.
Pressing his case before lawmakers on the eve of the showdown, the premier argued that his government had successfully worked to protect Italy from becoming engulfed in the eurozone's debt crisis. He warned that political instability would hurt Italy as it fights for its economic future.
Italy is plagued by a high public debt level and slow growth. The country is still widely viewed as low-risk due to the low level of private debt, a relatively sound banking system, and experience in dealing with high public debt levels. Still, markets were closely monitoring the results of the votes; Italy's main bourse closed little changed on Tuesday.
Berlusconi said after the vote that he would press ahead despite his uncertain majority in the lower house. "Even (President) Obama doesn't have the majority in one of the chambers," Berlusconi said.
One of the biggest casualties of the vote was Fini - who had staked major political capital on toppling Berlusconi. Fini's chances of replacing Berlusconi as conservative leader now appear slimmer, at least in the short term.
Ironically, it was Fini in his capacity as speaker of the lower house who announced the result: 314-311 in favor of the government. Applause broke out and Fini quickly ended the session.
Italy must now brace for a period of deep uncertainty.
Pierluigi Bersani, the leader of the opposition Democratic Party, called the result a "Pyrrhic victory" for Berlusconi. And even Berlusconi ally Roberto Maroni, the interior minister, said new elections may be necessary unless the government secures a broader majority.
Berlusconi is halfway through his five-year term and the next parliamentary election is scheduled for 2013.
"From the political and parliamentary point of view, Berlusconi scored a clear victory," said Stefano Folli, one of the leading Italian analysts. "But on the other hand, the government was weak before this vote and will be weak after it."
The down-to-the-wire vote capped hours of tension inside and outside parliament.
Three pregnant women whose presence had been in doubt until the last minute showed up and were among the first to cast their votes, all against Berlusconi, to the applause of their allies. One of them arrived by ambulance, another in a wheelchair. As undecided lawmakers were called to cast their vote, some in the house cheered them on, while others jeered.
The scuffles that forced the brief suspension of voting broke out as one of Fini's defectors announced her vote in favor of Berlusconi.
Outside parliament, thousands of people had descended on Rome for protests timed to coincide with the votes on a variety of causes. A core group of people soon turned violent, with aggression escalating after Berlusconi won the second vote.
Hundreds of students, some of them downing beers as they marched, smashed shop windows, destroyed bank ATMs and set vehicles on fire. Near Berlusconi's residence, police fired tear gas to disperse the approaching crowd.
The pavement of the central Piazza del Popolo was pocked by holes after protesters ripped out cobblestones to hurl. Police hit some protesters with clubs.
"What happened today depended on the rage that was felt after the vote of confidence," said Dalila Parrano, a student who said she had taken part in more peaceful protests.
Associated Press Writer Martino Villosio contributed to this report.