The Greek government's 30 billion euro ($40.25 billion) austerity bill passed a preliminary test in parliament before a final vote later on Thursday.

A total of 172 deputies in the 300-seat chamber backed the legislation in an initial vote, but three members of Prime Minister George Papandreou's Socialist party abstained, leading him to immediately expel them from his parliamentary team.

The defections were a first sign of the problems Papandreou faces within his own party in applying the harsh measures needed to pull Greece out of a crisis shaking international markets.

As the vote took place, a crowd of around 10,000 protesting students, workers and pensioners converged on parliament to voice their opposition to the bill, chanting Take to the streets! Say 'No' to the measures that hurt the Greek people!

On Wednesday, in the biggest and most violent protest since riots shook the country in 2008, some 50,000 Greeks marched in Athens and clashed with police in pitched street battles. A petrol bomb attack killed three workers in a local bank branch.

Speaking to lawmakers earlier, Papandreou said there was no time to lose in reforming Greece's broken economy, whose debt and deficit problems have triggered a wider crisis threatening the entire 16-nation euro zone.

The emergency measures are the condition for us to regain our credibility and win time, lost time. The time to make the big changes that were delayed for years, he said.

We wouldn't be here, we wouldn't be asking Greeks for these sacrifices, if this looting hadn't taken place, he said, accusing the previous conservative government of systematic corruption that pushed Greece to the brink of bankruptcy.

The legislation, which includes tax hikes, pension reforms and deep cuts in public sector bonuses which will slash take-home pay for a fifth of the workforce, is being pushed through in exchange for 110 billion euros in EU/IMF aid.

MORE PROTESTS PLANNED

Greece's main public and private sector unions, whose strikes on Wednesday grounded flights, shut shops and brought public transport to a standstill, say they will fight the government's plans.

Dozens of Athenians flocked to the site of the Marfin bank branch on Stadiou Avenue in central Athens, laying flowers at the entrance of the burned-out building where three employees choked to death on smoke at the height of the Wednesday march.

More than 50 people were hurt in Wednesday's clashes and 25 have been arrested for attacking police and damaging shops.

People are right to react and they should continue to protest because these measures are unfair, said Pinelopi Darmi, a 20-year-old university student. They hurt the poor only and let those responsible for the crisis get away with it.

Papandreou appeared to have heard those calls, saying that Greece's democratic institutions had been taken over by special interests and he would punish corrupt politicians.

We will send and we must send cases (of corruption) to the prosecutor, he said. This is what Greek people demand.

His government has talked often about justice and transparency since taking power last year, but no politicians have been prosecuted yet and the public is losing patience.

(Additional reporting by Dina Kyriakidou; writing by Noah Barkin; Editing by Angus MacSwan)