Italian prime minister Silvio Berlusconi is to continue in office after winning two confidence votes in parliament.
Two opposition deputies in the lower house switched sides enabling him to win the vote by 314 to 311.
Mr Berlusconi also won an earlier vote in the Senate. He had urged MPs not to jeopardise the country's stability by ousting him.
Mr Berlusconi, 74, is half way through a five-year term but his position has been weakened by a series of scandals largely involving his relationships with women and by corruption allegations.
Scuffles broke out in the lower house after an opposition MP voted in favour of Mr Berlusconi, and voting was briefly suspended.
Outside parliament, thousands of people gathered in Rome and Italy's other major cities to demand a change in government.
Police fired tear gas on protesters in Rome and several explosions - thought to be fireworks - were heard. Demonstrators threw eggs, paint and stones at parliament buildings.